BC ast-grep
AST-aware structural code search and rewrite via ast-grep.
AST-aware structural code search and rewrite via ast-grep.
As a process C 64/100 · Has gaps — weak spots: inputs and preconditions, running it twice
What is at stake
Medium-severity findings: the skill is probably honest, but read what alarmed the scanner.
Below is the worst case for this category. The finding here is medium: the guard saw a sign, not a proof.
The skill contains commands that delete files, rewrite disks or execute code fetched from the network. The agent may run them without asking if it believes the instructions require it.
Replace destructive commands with safe equivalents that ask for confirmation, scope them to one folder, and stop piping curl into a shell: pin a version and a checksum.
How to improve
- Your own cases (evals/evals.json, 4–6 real requests with expected answers): the full check would then run those instead of a model-drafted suite.
- A spec.yaml with trigger phrases and assertions — a behaviour contract for CI; `skilltest init` writes a template.
Guard findings · 3
✓ No critical or high findings
Medium and low: 3
-
medium Dangerous commands
cmd-shell-rcreferences/cli.md:196Writes to a shell startup filesg completions bash >> ~/.bashrc
-
medium Dangerous commands
cmd-privilegereferences/install.md:101Privilege escalation / world-writable permissionssudo mv /tmp/ast-grep/ast-grep /usr/local/bin/sg
-
medium Dangerous commands
cmd-privilegereferences/install.md:102Privilege escalation / world-writable permissionssudo chmod +x /usr/local/bin/sg
Files scanned: 12. Evidence is masked. Grey chips explain why severity was lowered.
Against the Agent Skills spec
✓ No remarks against the Agent Skills spec
Process rating: all ten parameters 64/100
- 0Inputs and preconditions. Does not say what the process needs to start
- 30Running it twice. 3 mutating operations with no state check
- 60Tools and files. Uses tools (bash, python) that frontmatter does not declare
- 60Result and completion. Output format stated, no completion criterion
- 60Consistency. The Hermes dialect needs category and tags
- 70When it triggers. States when to use, but not when not to
- 85Steps. 53 steps, 1 vague phrases
- 100Failures and branches. 2 branches, has a failure section
- 100Execution cost. Instruction body is 3140 tokens
- 100Progress reporting. Reports progress
- medium Safety rules and hard prohibitions inside a skill: they belong in the system prompt, here they protect nothing
- low 11 top-level sections: this looks like several domains in one skill
- low The response is described with custom markup (6 tags): a typed call is more reliable
Everything here is measured from the skill text rather than judged by a model, so the numbers are checkable. A parameter weighs more when it is a more common reason for the process to stall.
Quality signals
- +5Description has no quoted example phrases that should trigger the skill
- +4Description does not say when NOT to use the skill (false activations)
- +3Description length 58: 120–800 characters recommended
- +2Single-language instructions
- +4Structure: 20 headings
- +3Step-by-step instructions: 53 items
- +3Output format is stated explicitly
- +4Has examples (8 code blocks)
- +4Reference files are cited in the instructions (7 of 7)
- +3All 1 scripts are documented
- +1License stated
Quality base 70; lint remarks subtract, signals add up to 100. Result: 92.