Skip to content

fix(skill): stop pasting agent-supplied values into skill scripts (#4309) - #4344

Open
Deepjyoti-Sarmah wants to merge 16 commits into
Graphify-Labs:v8from
Deepjyoti-Sarmah:fix/skill-no-pasted-placeholders
Open

Deepjyoti-Sarmah wants to merge 16 commits into
Graphify-Labs:v8from
Deepjyoti-Sarmah:fix/skill-no-pasted-placeholders

Conversation

@Deepjyoti-Sarmah

@Deepjyoti-Sarmah Deepjyoti-Sarmah commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

In short: the skill told the agent to paste the scan folder, community names and spec path into python -c "..." scripts, so a folder named proj$(touch X) ran touch X. Now the agent writes each value to a file in graphify-out/ and the script reads the file. Fixes #4309.

To review: about 340 hand-written lines in 11 files (list below). The other 172 changed files are regenerated by uv run python -m tools.skillgen --bless, and --check confirms they match the sources.

What does this PR do?

Fixes #4309.

The skill told the agent to paste three values into the Python scripts it runs:

  • INPUT_PATH, the folder to scan
  • LABELS_DICT, the community names
  • SPEC_PATH, the path to the extraction spec

A pasted value becomes code. A folder named proj$(touch PWNED) runs touch PWNED before Python starts, and a label like x'}; ...; # ends the Python string early.

Now the agent writes each value to a file through a quoted heredoc (the shell copies it as plain text), and the script reads the file:

 Step 1        + save the scan folder to graphify-out/.graphify_root
 later steps   - detect(Path('INPUT_PATH'))
               + detect(read_scan_root())
 Step B0/B3    - prompt_file='SPEC_PATH'
               + prompt_file=<read from graphify-out/.graphify_spec_path>
 Step 5        - labels = LABELS_DICT
               + labels = json.loads(<graphify-out/.graphify_labels_in.json>)

It also quotes the interpreter path, "$(cat graphify-out/.graphify_python)", so an interpreter under /Users/First Last/ no longer splits in two.

How to review

Read these, in this order:

File What changed
tools/skillgen/fragments/core/core.md the skill steps: read the saved files instead of pasting
tools/skillgen/fragments/references/shared/update.md, references/query/default.md, and three small references/shared/*.md the same change in the reference pages
tools/skillgen/fragments/core/aider.md, core/devin.md the same changes in the two single-file skills
graphify/paths.py new read_scan_root() (20 lines)
tools/skillgen/gen.py the Windows translator learns the spec-path heredoc; the monolith check ignores the added interpreter quotes
tests/test_skillgen_no_pasted_placeholders.py the new test that fails if any script pastes a value again

Skip graphify/skill*.md, graphify/skills/** and tools/skillgen/expected/**. They're generated.

Evidence: before and after

The real Step 2 script from graphify/skill.md, run on a folder named proj$(touch PWNED):

v8:           PWNED file created, then "could not scan .../proj", Detected 0 files
this branch:  nothing created, Detected 1 files

On v8 the folder name runs as a command and the wrong folder gets scanned.

Reproduce it

From a checkout, with graphify installed in .venv:

mkdir -p /tmp/demo/'proj$(touch PWNED)' /tmp/demo/graphify-out && cd /tmp/demo
echo '# notes' > 'proj$(touch PWNED)/notes.md'
echo "$OLDPWD/.venv/bin/python" > graphify-out/.graphify_python
git -C "$OLDPWD" show upstream/v8:graphify/skill.md \
  | python3 -c "import re,sys; t=sys.stdin.read(); print(next(b for b in re.findall(r'\`\`\`bash\n(.*?)\n\`\`\`', t, re.S) if 'graphify_detect.json' in b))" \
  | sed "s|INPUT_PATH|$PWD/proj\$(touch PWNED)|" | bash
ls    # PWNED is here

Commits

7e36f0c  test: fail when a skill script pastes INPUT_PATH or LABELS_DICT
5f0b6da  read_scan_root() reads the folder Step 1 saved
2b1ef8f  Step 5 reads the community names from a JSON file
9c42b07  every step reads the scan folder from the file
e783cdd  quote the interpreter path
08cf41a  Steps B0 and B3 read the spec path from a file
714f132  read_scan_root() keeps spaces in the saved folder

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Tests or CI
  • Refactor
  • Security fix

Verification & Invariants

The rule: a value the agent supplies never becomes part of a script. Scripts read it from a file in graphify-out/.

Enforced by tests/test_skillgen_no_pasted_placeholders.py: it renders every skill and fails if a script contains INPUT_PATH, LABELS_DICT or SPEC_PATH, or runs the interpreter unquoted. It fails on the test commit alone (7e36f0c) and passes on the branch. Two more tests run the real heredocs with hostile input (x $(touch PWNED) `touch PWNED2` $HOME) and check that nothing runs.

Limitations:

How was this tested?

Linux, Python 3.13, rebased on v8 fe085ce (0.9.90).

uv run pytest tests/                              # 8190 passed, 70 skipped, 0 failed
uv run ruff check .                               # no issues
uv run pyright                                    # 640 errors, same as v8: none added
uv run python -m tools.skillgen --check           # 134 files match
uv run python -m tools.skillgen --monolith-roundtrip, --audit-coverage,
  --schema-singleton, --always-on-roundtrip       # all OK

Rebased on v8 fe085ce. One new commit: v8 added tests/test_query_fallback_edges.py, which found the query fallback by the unquoted opener. This branch quotes the interpreter path, so the test now matches on -c " and the import lines after it.

The changed test files also passed on Python 3.10 and 3.13. The Windows blocks from skill-windows.md ran under PowerShell 7.4.6, and the semantic cache still hits on a second run.

Merge Danger

Door: two-way. A revert restores the old skill text. No data is migrated.

Blast Radius: every skill. The library gains only read_scan_root().

Graphify-specific checklist

  • I updated generated skill artifacts (uv run python -m tools.skillgen --bless) when changing their source fragments.
  • I confirmed that AST/structural extraction remains deterministic (no ambient state dependencies like ENV variables). This PR doesn't touch extraction code.
  • I reviewed changes for security implications (no unsafe interpolation into shell/Python).
  • I confirmed no API keys or local-only graph data are included.
  • (If applicable) I disclosed AI authorship in my commit messages.

AI disclosure: I made these changes with Claude Code (Claude Opus 5.5). Claude Code ran the tests and commands listed above in my local checkout, and I reviewed every change and the results.

Update: rebased on 0.9.89

One new commit, fix(skill): refuse a scan path with a line break in Step 1, answers the comment on #4309. A path line could end the heredoc early (or the here-string on PowerShell), and anything after it would run as shell. The agent is now told to refuse such a path, and the Python side rejects input of more than one line.

The agent instruction is the real guard. The shell ends the heredoc before Python runs, so the Python check only catches multi-line input that reaches it.

#4353 is stacked on this PR.

@github-actions

Copy link
Copy Markdown

Thanks for the pull request, @Deepjyoti-Sarmah. A maintainer will review it soon.

Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions.

A couple of things that speed up review: make sure the test suite passes on Python 3.10 and 3.13, and that the change keeps extraction deterministic.

@graphify-labs graphify-labs Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graphify reviewed this change.

Worth a look — the grounded gate found no coupling regressions or blocking issues, but 1 advisory finding(s) below merit a look before merge.

Not checked: tests were not run; formal verification proved 0 of 2 changed function(s) (1 sampled, not proven, 1 not verified).

Formal verification. PR-changed functions: 1/2 verified (0 proven, 1 may-equivalent, 0 distinguished) · 1 not verified (1 vacuous).

Not verified on this run: \_translate\_bash\_block (vacuous: never exercised).


Graphify review — findings

Stops agents from pasting the user's scan path and extraction-spec path into Python source in the skill steps, so a hostile folder name stays data, never code (#4309). Steps now read the root through a new read_scan_root() helper backed by graphify-out/.graphify_root, and the spec path through a quoted-heredoc .graphify_spec_path file that both cache read and cache write consume. read_scan_root() fails with "run Step 1 first" when the marker is missing or empty and rejects a non-directory; the interpreter substitution is also quoted as "$(cat graphify-out/.graphify_python)".

Worth a look

  • strip() mangles scan roots with leading/trailing whitespace — graphify/paths.py:419 · Escalate · medium
    • agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review

Review partial — this diff was larger than one review pass covers, so later files were not reviewed; some findings may be missing.

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 5036 functions depend on the 2101 functions this change touches.

Health — this change adds coupling hotspots:

  • worse: monolith_roundtrip() — 3 callers, 6 callees

Verification — 5036 functions in the blast radius were not formally verified this run (proofs are advisory here).

Gate & verification

graphify gate

PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.

Advisory (not blocking):

  • verification_scope: 3813 function(s) in the blast radius were not formally verified this run

Test selection

Test selection

368 of 368 test file(s) selected (100%) via static blast radius.

Escalated to a full run for safety — the selection is not trustworthy on its own (see below). CI should run the whole suite.

  • tests/test_affected_cli.py — impact, full-run-safety
  • tests/test_affected_defines.py — full-run-safety
  • tests/test_affected_member_seed.py — full-run-safety
  • tests/test_agents_platform.py — impact, full-run-safety
  • tests/test_analyze.py — impact, full-run-safety
  • tests/test_anthropic_custom_endpoint.py — full-run-safety
  • tests/test_antigravity_install.py — full-run-safety
  • tests/test_apm_fallback_version.py — full-run-safety
  • tests/test_architecture_doc.py — full-run-safety
  • tests/test_astro_extraction.py — full-run-safety
  • tests/test_astro_import_ids.py — full-run-safety
  • tests/test_atomic_canvas_export.py — impact, full-run-safety
  • tests/test_atomic_version_stamp.py — impact, full-run-safety
  • tests/test_atomic_writes.py — impact, full-run-safety
  • tests/test_backend_env_isolation.py — full-run-safety
  • tests/test_backend_extras.py — full-run-safety
  • tests/test_benchmark.py — impact, full-run-safety
  • tests/test_benchmark_raw_graph.py — impact, full-run-safety
  • tests/test_blade_extractor.py — full-run-safety
  • tests/test_build.py — impact, full-run-safety
  • tests/test_build_located_semantic_identity.py — impact, full-run-safety
  • tests/test_build_merge_dedup_scope.py — impact, full-run-safety
  • tests/test_build_merge_hyperedges_and_prune.py — impact, full-run-safety
  • tests/test_build_merge_shrink_guard.py — impact, full-run-safety
  • tests/test_builtin_global_type_refs.py — full-run-safety
  • tests/test_cache.py — impact, full-run-safety
  • tests/test_cache_stale_import_target.py — impact, full-run-safety
  • tests/test_callflow_html.py — impact, full-run-safety
  • tests/test_cargo_introspect.py — full-run-safety
  • tests/test_cargo_missing_manifest.py — full-run-safety
  • tests/test_carried_hyperedge_remap.py — impact, full-run-safety
  • tests/test_case_sensitive_resolution.py — full-run-safety
  • tests/test_charmap_encoding.py — impact, full-run-safety
  • tests/test_chunking.py — impact, full-run-safety
  • tests/test_cjs_module_extension.py — full-run-safety
  • tests/test_claude_cli_backend.py — full-run-safety
  • tests/test_claude_md.py — full-run-safety
  • tests/test_cli_broken_pipe.py — full-run-safety
  • tests/test_cli_export.py — impact, full-run-safety
  • tests/test_cli_help.py — full-run-safety
  • tests/test_cloud_cta.py — full-run-safety
  • tests/test_cluster.py — impact, full-run-safety
  • tests/test_cluster_ambiguous_scale.py — full-run-safety
  • tests/test_cluster_exclude_hubs.py — full-run-safety
  • tests/test_cobol_extractor.py — full-run-safety
  • tests/test_codebuddy.py — impact, full-run-safety
  • tests/test_community_hub_labels.py — full-run-safety
  • tests/test_community_labels_skill.py — impact, changed-test, full-run-safety
  • tests/test_confidence.py — impact, full-run-safety
  • tests/test_corrupt_graph_json.py — impact, full-run-safety
  • … and 318 more

non-code file(s) changed (graphify/skill-agents.md, graphify/skill-aider.md, graphify/skill-amp.md, graphify/skill-claw.md, graphify/skill-codex.md …) → running the full suite for safety (a code graph can't see config/fixture/data deps)

changed code file(s) with no mapped test (graphify/skill-agents.md, graphify/skill-aider.md, graphify/skill-amp.md, graphify/skill-claw.md, graphify/skill-codex.md …) — a coverage gap or a missing link — running the full suite rather than only the selected tests

Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.

Formal verification

Could not verify: Could not verify \_translate\_bash\_block.

The verifier did not have enough to check \_translate\_bash\_block, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: no capturable inputs from the test suite; property tier: non-vacuity: domain too small (only 1 distinct inputs exercised, need 3) — 'no divergence' would be near-vacuous

No difference found (not proven): No behavior difference found in monolith\_roundtrip (not a proof).

The verifier ran both versions of monolith\_roundtrip on many inputs and saw identical behavior every time. Strong evidence the change is safe, but evidence, not a proof.

Guarantee: Empirical: differential testing (both versions run on many generated inputs). A divergence on an untested input remains possible, so this is 'no counterexample found', not 'proven equivalent'.

Note: An input the sampler did not try could still differ.

· 1 more finding(s) on lines outside this diff (see the check run).

@Deepjyoti-Sarmah

Copy link
Copy Markdown
Contributor Author

Graphify reviewed this change.

Worth a look — the grounded gate found no coupling regressions or blocking issues, but 1 advisory finding(s) below merit a look before merge.

Not checked: tests were not run; formal verification proved 0 of 2 changed function(s) (1 sampled, not proven, 1 not verified).

Formal verification. PR-changed functions: 1/2 verified (0 proven, 1 may-equivalent, 0 distinguished) · 1 not verified (1 vacuous).

Not verified on this run: \_translate\_bash\_block (vacuous: never exercised).

Graphify review — findings

Stops agents from pasting the user's scan path and extraction-spec path into Python source in the skill steps, so a hostile folder name stays data, never code (#4309). Steps now read the root through a new read_scan_root() helper backed by graphify-out/.graphify_root, and the spec path through a quoted-heredoc .graphify_spec_path file that both cache read and cache write consume. read_scan_root() fails with "run Step 1 first" when the marker is missing or empty and rejects a non-directory; the interpreter substitution is also quoted as "$(cat graphify-out/.graphify_python)".

Worth a look

  • strip() mangles scan roots with leading/trailing whitespace — graphify/paths.py:419 · Escalate · medium

    • agreed by 2 of 2 members but NOT verified (no proof, no reproducing execution) — consensus is not a verdict; needs human review

Review partial — this diff was larger than one review pass covers, so later files were not reviewed; some findings may be missing.

Analysis details — impact, health, verification

Impact & health

Graphify review

Impact — 5036 functions depend on the 2101 functions this change touches.

Health — this change adds coupling hotspots:

  • worse: monolith_roundtrip() — 3 callers, 6 callees

Verification — 5036 functions in the blast radius were not formally verified this run (proofs are advisory here).

Gate & verification

graphify gate

PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.

Advisory (not blocking):

  • verification_scope: 3813 function(s) in the blast radius were not formally verified this run

Test selection

Test selection

368 of 368 test file(s) selected (100%) via static blast radius.

Escalated to a full run for safety — the selection is not trustworthy on its own (see below). CI should run the whole suite.

  • tests/test_affected_cli.py — impact, full-run-safety
  • tests/test_affected_defines.py — full-run-safety
  • tests/test_affected_member_seed.py — full-run-safety
  • tests/test_agents_platform.py — impact, full-run-safety
  • tests/test_analyze.py — impact, full-run-safety
  • tests/test_anthropic_custom_endpoint.py — full-run-safety
  • tests/test_antigravity_install.py — full-run-safety
  • tests/test_apm_fallback_version.py — full-run-safety
  • tests/test_architecture_doc.py — full-run-safety
  • tests/test_astro_extraction.py — full-run-safety
  • tests/test_astro_import_ids.py — full-run-safety
  • tests/test_atomic_canvas_export.py — impact, full-run-safety
  • tests/test_atomic_version_stamp.py — impact, full-run-safety
  • tests/test_atomic_writes.py — impact, full-run-safety
  • tests/test_backend_env_isolation.py — full-run-safety
  • tests/test_backend_extras.py — full-run-safety
  • tests/test_benchmark.py — impact, full-run-safety
  • tests/test_benchmark_raw_graph.py — impact, full-run-safety
  • tests/test_blade_extractor.py — full-run-safety
  • tests/test_build.py — impact, full-run-safety
  • tests/test_build_located_semantic_identity.py — impact, full-run-safety
  • tests/test_build_merge_dedup_scope.py — impact, full-run-safety
  • tests/test_build_merge_hyperedges_and_prune.py — impact, full-run-safety
  • tests/test_build_merge_shrink_guard.py — impact, full-run-safety
  • tests/test_builtin_global_type_refs.py — full-run-safety
  • tests/test_cache.py — impact, full-run-safety
  • tests/test_cache_stale_import_target.py — impact, full-run-safety
  • tests/test_callflow_html.py — impact, full-run-safety
  • tests/test_cargo_introspect.py — full-run-safety
  • tests/test_cargo_missing_manifest.py — full-run-safety
  • tests/test_carried_hyperedge_remap.py — impact, full-run-safety
  • tests/test_case_sensitive_resolution.py — full-run-safety
  • tests/test_charmap_encoding.py — impact, full-run-safety
  • tests/test_chunking.py — impact, full-run-safety
  • tests/test_cjs_module_extension.py — full-run-safety
  • tests/test_claude_cli_backend.py — full-run-safety
  • tests/test_claude_md.py — full-run-safety
  • tests/test_cli_broken_pipe.py — full-run-safety
  • tests/test_cli_export.py — impact, full-run-safety
  • tests/test_cli_help.py — full-run-safety
  • tests/test_cloud_cta.py — full-run-safety
  • tests/test_cluster.py — impact, full-run-safety
  • tests/test_cluster_ambiguous_scale.py — full-run-safety
  • tests/test_cluster_exclude_hubs.py — full-run-safety
  • tests/test_cobol_extractor.py — full-run-safety
  • tests/test_codebuddy.py — impact, full-run-safety
  • tests/test_community_hub_labels.py — full-run-safety
  • tests/test_community_labels_skill.py — impact, changed-test, full-run-safety
  • tests/test_confidence.py — impact, full-run-safety
  • tests/test_corrupt_graph_json.py — impact, full-run-safety
  • … and 318 more

non-code file(s) changed (graphify/skill-agents.md, graphify/skill-aider.md, graphify/skill-amp.md, graphify/skill-claw.md, graphify/skill-codex.md …) → running the full suite for safety (a code graph can't see config/fixture/data deps)

changed code file(s) with no mapped test (graphify/skill-agents.md, graphify/skill-aider.md, graphify/skill-amp.md, graphify/skill-claw.md, graphify/skill-codex.md …) — a coverage gap or a missing link — running the full suite rather than only the selected tests

Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.

Formal verification

Could not verify: Could not verify \_translate\_bash\_block.

The verifier did not have enough to check \_translate\_bash\_block, so it is saying so rather than guessing. No false assurance is the whole point.

Guarantee: No guarantee either way, this is an honest abstention, not a pass.

Note: Reason: no capturable inputs from the test suite; property tier: non-vacuity: domain too small (only 1 distinct inputs exercised, need 3) — 'no divergence' would be near-vacuous

No difference found (not proven): No behavior difference found in monolith\_roundtrip (not a proof).

The verifier ran both versions of monolith\_roundtrip on many inputs and saw identical behavior every time. Strong evidence the change is safe, but evidence, not a proof.

Guarantee: Empirical: differential testing (both versions run on many generated inputs). A divergence on an untested input remains possible, so this is 'no counterexample found', not 'proven equivalent'.

Note: An input the sampler did not try could still differ.

· 1 more finding(s) on lines outside this diff (see the check run).

Good catch: a root ending in a space would be trimmed, and if a sibling folder with the trimmed name exists, the wrong folder gets scanned.

This PR matches what every existing .graphify_root reader already does (cli.py watch, hooks.py x2, build.py), so fixing only read_scan_root() here would make the readers disagree about which folder the marker names. I'll fix all of them together in a follow-up that also covers Step 1 writing an empty marker when the disk is full: one helper that strips only the BOM and the trailing newline, used by every reader.

…DICT (Graphify-Labs#4309)

The skill has the agent paste these two values into python -c scripts. A label
like `x $(touch PWNED)` then runs in the shell, and `x'}; ...` runs as Python.
Step 1 and --watch were fixed earlier; the other steps and the labels were not.

The tests render every skill file and check that no script pastes them, that the
interpreter path is quoted, and that Step 5 reads labels from JSON. They also
pin read_scan_root(), which doesn't exist yet, so they fail until the fix lands.
…aphify-Labs#4309)

Skill steps paste INPUT_PATH into python -c scripts, so a folder name such as
`proj$(touch X)` can run as shell code. The root is already saved by Step 1 in
graphify-out/.graphify_root; this reads it back as plain data. The root may sit
outside the cwd, so it only has to be a non-empty path to an existing directory.
…code (Graphify-Labs#4309)

Step 5 had the agent paste a Python dict over LABELS_DICT and the scan path over
INPUT_PATH inside a double-quoted python -c script. A label such as
`x $(touch PWNED)` ran in the shell, and `x'}; ...` ran as Python.

The agent now writes the names as JSON through a quoted heredoc and the script
loads them with json.loads. The scan root comes from read_scan_root(). The
generator turns the heredoc into a PowerShell here-string for Windows, and the
monolith audit allows these lines. INPUT_PATH in the other steps and the
interpreter quoting follow in separate commits.
…tep (Graphify-Labs#4309)

The skill had the agent paste the scan path over INPUT_PATH inside the
double-quoted python -c scripts of Steps 2, 3, 4, 4.5 and 9 and the --update
runbook. A folder name such as `proj$(touch X)` then ran as shell code.

Those scripts now call read_scan_root(). The monolith audit allows the seven
lines that changed, and the persisted-scan-options test writes
graphify-out/.graphify_root as the skill does. Step 1 still takes the path
through a quoted heredoc, which is safe. A step run by hand without Step 1 now
fails with FileNotFoundError.
…y-Labs#4309)

Step 1 saves the interpreter to graphify-out/.graphify_python and every later
step runs it as $(cat graphify-out/.graphify_python). Unquoted, an interpreter
under a folder with a space (/Users/First Last/...) splits into two words and
the step fails. Every invocation is now "$(cat graphify-out/.graphify_python)",
including the guidance that tells the agent how to call Python.

The Windows translator recognizes script openers by exact text, so
_PY_INVOKE_POSIX changes to match. The monolith round-trip unquotes the
rendered side before diffing, so a quote-only change cancels out while any
other edit on those lines is still flagged.
Graphify-Labs#4309)

Steps B0 and B3 had the agent paste the spec path over SPEC_PATH inside
prompt_file='SPEC_PATH' in a double-quoted python -c body, so a path with a
quote or $( ran as Python or shell. Step B0 now writes the path to
graphify-out/.graphify_spec_path through a quoted heredoc, and both cache calls
read it back, so the read and the write still name the same prompt (Graphify-Labs#1939).

The Windows translator handled only the labels heredoc; it now takes a table of
the known data heredocs, and any other heredoc still raises.
…Labs#4309)

A scan path with a line break could end the quoted heredoc (or the PowerShell
here-string) early and run the lines after it as shell.
The skill now tells the agent to refuse such a path and ask for another one.
The POSIX Python side reads all of stdin and exits non-zero on more than one
line; the PowerShell block does the same check. The block comments now say
only what is true.
…ath is quoted (Graphify-Labs#4309)

test_query_fallback_edges.py located the script by the unquoted opener $(cat graphify-out/.graphify_python) -c ". This branch quotes the interpreter path, so the lookup failed. It now matches on -c " plus the import lines that follow, which only the fallback block has.
… seed .graphify_root in the code-only update test (Graphify-Labs#4309)

The aider and devin code-only blocks that landed with Graphify-Labs#4447 still called
$(cat graphify-out/.graphify_python) unquoted. The code-only update test
pasted INPUT_PATH itself and never wrote the marker Step 1 records, which
the update blocks now read.
@Deepjyoti-Sarmah
Deepjyoti-Sarmah force-pushed the fix/skill-no-pasted-placeholders branch from 325e434 to 7a9c4c0 Compare October 16, 2026 18:45
…laceholders

# Conflicts:
#	graphify/skill-agents.md
#	graphify/skill-amp.md
#	graphify/skill-claw.md
#	graphify/skill-codex.md
#	graphify/skill-copilot.md
#	graphify/skill-droid.md
#	graphify/skill-kilo.md
#	graphify/skill-kiro.md
#	graphify/skill-opencode.md
#	graphify/skill-pi.md
#	graphify/skill-trae.md
#	graphify/skill-vscode.md
#	graphify/skill-windows.md
#	graphify/skill.md
#	tools/skillgen/expected/graphify__skill-agents.md
#	tools/skillgen/expected/graphify__skill-amp.md
#	tools/skillgen/expected/graphify__skill-claw.md
#	tools/skillgen/expected/graphify__skill-codex.md
#	tools/skillgen/expected/graphify__skill-copilot.md
#	tools/skillgen/expected/graphify__skill-droid.md
#	tools/skillgen/expected/graphify__skill-kilo.md
#	tools/skillgen/expected/graphify__skill-kiro.md
#	tools/skillgen/expected/graphify__skill-opencode.md
#	tools/skillgen/expected/graphify__skill-pi.md
#	tools/skillgen/expected/graphify__skill-trae.md
#	tools/skillgen/expected/graphify__skill-vscode.md
#	tools/skillgen/expected/graphify__skill-windows.md
#	tools/skillgen/expected/graphify__skill.md
#	tools/skillgen/fragments/core/core.md
The no-pasted-placeholder fixes (Graphify-Labs#4309) grew the blessed skill.md to 817
lines. 817 is still materially smaller than the old ~1156-line monolith,
so the cap tracks that intent instead of an exact number (same fix as
4353: 6a2697d).
Upstream Graphify-Labs#4762 already reads the scan root from .graphify_root into an
INPUT_PATH variable in every block, so this branch adopts that and drops
its own read_scan_root() rewrites of the skill scripts. What stays here:
Step 5 labels read from JSON, the spec path read from a file, the quoted
interpreter path, and the Step 1 line-break refusal.

The placeholder guard now matches only the quoted 'INPUT_PATH' literal,
and the Graphify-Labs#4777 force test writes the labels file instead of pasting
LABELS_DICT.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

skill.md: shell injection through LABELS_DICT and INPUT_PATH in python -c "..." blocks, plus three smaller robustness gaps (v0.9.84)

1 participant