skill scanner

AI Community

Skill notes

scripts/scanskill.py

Static analysis scanner that detects deterministic patterns. Outputs structured JSON. Returns JSON with findings, URLs, structure info, and severity counts. The script catches patterns mechanically — your job is to evaluate intent and filter false positives.

Phase 1: Input & Discovery

Determine the scan target: If the user provides a skill directory path, use it directly If the user names a skill, look for it under plugins/*/skills/<name>/ or .claude/skills/<name>/ If the user says "scan all skills", discover all */SKILL.md files and scan each Validate the target contains a SKILL.md file. List the skill structure:

Phase 2: Automated Static Scan

Run the bundled scanner: Parse the JSON output. The script produces findings with severity levels, URL analysis, and structure information. Use these as leads for deeper analysis. Fallback: If the script fails, proceed with manual analysis using Grep patterns from the reference files.

Phase 3: Frontmatter Validation

Read the SKILL.md and check: Required fields: name and description must be present Name consistency: name field should match the directory name Tool assessment: Review allowed-tools — is Bash justified? Are tools unrestricted (*)? Model override: Is a specific model forced? Why?

Phase 4: Prompt Injection Analysis

Load ${CLAUDE_SKILL_ROOT}/references/prompt-injection-patterns.md for context. Review scanner findings in the "Prompt Injection" category. For each finding: Read the surrounding context in the file Determine if the pattern is performing injection (malicious) or discussing/detecting injection (legitimate) Skills about security, testing, or education commonly reference injection patterns — this is expected

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
AI
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@deadlock-mod-manager · no license declared
Token usage
Lean
Setup complexity
Guided setup
External API key
Not required
Operating systems
Unspecified (assume cross-platform)
Runtime requirements
No explicit requirements detected
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
  • Env read
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Phase 1: Input & Discovery

Determine the scan target: If the user provides a skill directory path, use it directly If the user names a skill, look for it under `plugins/*/skills/<name>/` or `.claude/skills/<name>/` If the user says "scan all skills", discover all `*/SKILL.md` files and scan each Validate the target contains a `SKILL.md` file. List the skill structure:

02
Phase 2: Automated Static Scan

Run the bundled scanner: Parse the JSON output. The script produces findings with severity levels, URL analysis, and structure information. Use these as leads for deeper analysis. Fallback: If the script fails, proceed with manual analysis using Grep patterns from the reference files.

03
Phase 3: Frontmatter Validation

Read the SKILL.md and check: Required fields: `name` and `description` must be present Name consistency: `name` field should match the directory name Tool assessment: Review `allowed-tools` — is Bash justified? Are tools unrestricted (`*`)? Model override: Is a specific model forced? Why?

04
Phase 4: Prompt Injection Analysis

Load `${CLAUDE_SKILL_ROOT}/references/prompt-injection-patterns.md` for context. Review scanner findings in the "Prompt Injection" category. For each finding: Read the surrounding context in the file Determine if the pattern is performing injection (malicious) or discussing/detecting injection (legitimate) Skills about security, testing, or education commonly reference injection patterns — this is expected

05
Phase 5: Behavioral Analysis

This phase is agent-only — no pattern matching. Read the full SKILL.md instructions and evaluate: Description vs. instructions alignment: Does the description match what the instructions actually tell the agent to do? A skill described as "code formatter" that instructs the agent to read ~/.ssh is misaligned Config/memory poisoning:

06
Phase 6: Script Analysis

If the skill has a `scripts/` directory: Load `${CLAUDE_SKILL_ROOT}/references/dangerous-code-patterns.md` for context Read each script file fully (do not skip any) Check scanner findings in the "Malicious Code" category For each finding, evaluate:

07
Phase 7: Supply Chain Assessment

Review URLs from the scanner output and any additional URLs found in scripts: Trusted domains: GitHub, PyPI, official docs — normal Untrusted domains: Unknown domains, personal sites, URL shorteners — flag for review Remote instruction loading: Any URL that fetches content to be executed or interpreted as instructions is high risk Dependency downloads: Scripts that download and execute binaries or code at runtime

08
Phase 8: Permission Analysis

Load `${CLAUDE_SKILL_ROOT}/references/permission-analysis.md` for the tool risk matrix. Evaluate: Least privilege: Are all granted tools actually used in the skill instructions? Tool justification: Does the skill body reference operations that require each tool? Risk level: Rate the overall permission profile using the tier system from the reference

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.