Install
$ agentstack add skill-forceinjection-repo2skill-repo2skill-skill ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ● Filesystem access Used
- ● Shell / process execution Used
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Repo2Skill
Conditions
Trigger
User asks to convert, decompose, or skill-ify a Python repository into an Agent Skill.
Preconditions
- Python 3.11+ with repo2skill package installed (
pip install -e .) - Source repo is accessible (local path, git URL, or GitHub URL)
File Patterns
*.py(source code to analyze)analysis.json(intermediate artifact from Structurer)candidates.json(rule-based baseline scores from extract.py)SKILL.md,skill.yaml,suite.yaml(output artifacts)
Policy
Type
workflow
Entry Point
repo2skill-skill/SKILL.md (this file)
Steps
- Structure: Run
scripts/structure.py— clones the repo, parses all Python files via AST, builds the dependency graph, pre-annotates the four-tuple for each module, and writesanalysis.json(includesskills[],dependency_graph,readme_summary).
- Extract (baseline): Run
scripts/extract.py— applies rule-based scoring (recurrence, verification, non-obviousness, generalizability) and writescandidates.jsonwithSkillCandidateobjects containingconfidence,reasoning, and per-criterionscores.
- Extract (Agent refinement): Read
analysis.jsonandcandidates.json. Act as the Extractor by following the five-step procedure inreferences/extractor-guide.md— filter, merge, score, enrich — and select the top 1–5 candidates.
- Present candidates to the user. In interactive mode, let the user choose which to generate. In non-interactive mode, auto-select candidates whose final confidence exceeds the threshold (default 0.5).
- Detect suite mode before assembling. Apply the 4 criteria in
references/suite-mode.md. If any criterion is met, propose suite mode and validate that inter-skill relations form a DAG.
- Assemble: Run
scripts/assemble.py [--mode suite]— renders Jinja2 templates intoSKILL.md+skill.yaml(single mode) orsuite.yaml+ per-skill subdirectories (suite mode). Validates progressive disclosure token budgets. The output at this stage is a structural starting point — the content is template-generated and needs enrichment.
- Enrich (Agent rewrites): The assembled SKILL.md files contain template-filled content. Read each assembled SKILL.md and substantially rewrite it following
references/enrichment-guide.md. Write the enriched content back to the same files. This is the most important step for skill quality.
- G1 scan: Run
scripts/audit_g1.py— deterministic regex/AST scan for dangerous patterns (eval,exec,subprocess,socket,os.system,shutil.rmtree, Jinja2|safe, etc.). If HIGH-severity findings are found, block and warn the user (unless--force-continue).
- G2 review (preparation): Run
scripts/audit_g2.py— generatesg2_.md, a structured review context file combining the assembled skill content with the source analysis.
- G2 review (Agent): Read the
g2_.mdcontext file and act as the Reviewer G2 by followingreferences/g2-review.md— evaluate hallucination, prompt injection, and metadata consistency, then compute an aggregate score.
- Record G2 results: Write the G2 verdict and aggregate score into the generated
skill.yamlundersecurity.g2-score. If suite mode, update each sub-skill'sskill.yaml.
- Compute trust level: Determine L0, L1, or L2 using the rules in
references/trust-levels.md. Report the final trust level to the user.
Dependencies
- typer, pydantic, gitpython, jinja2, pyyaml
- git (for cloning remote repos)
Termination
Success Criteria
A valid Agent Skill directory (or Skill Suite) is produced with:
SKILL.mdpassing progressive disclosure token budgets (Level 1: 30–100 tokens, Level 2: 200–5,000 tokens)skill.yamlwith valid kebab-case metadata- G1 scan passed (or user explicitly overrode with
--force-continue) - G2 review score recorded in
skill.yamlundersecurity.g2-score - Trust level assigned (L0, L1, or L2)
Output Schema
{
"skill_dir": "string (path to generated skill)",
"skill_name": "string",
"trust_level": "L0 | L1 | L2",
"g1_passed": "boolean",
"g2_score": "float (0.0–1.0)",
"candidates": ["SkillCandidate"],
"mode": "single | suite"
}
Interface
Parameters
| Parameter | Type | | ---------------------- | ------------------------- | | source | str (repo URL or path) | | out | Path (output directory) | | mode | single \| suite \| auto | | interactive | bool | | confidence_threshold | float (0.0–1.0) | | force_continue | bool |
References
Detailed reference material lives in references/:
- [
references/extractor-guide.md](references/extractor-guide.md) — Five-step extraction procedure (filter, merge, score, enrich) with scoring criteria and modifiers. - [
references/enrichment-guide.md](references/enrichment-guide.md) — How to rewrite template-filled SKILL.md files into high-quality skills, with a before/after example. - [
references/g2-review.md](references/g2-review.md) — The three-dimension semantic review (hallucination, injection, consistency) and aggregate scoring. - [
references/trust-levels.md](references/trust-levels.md) — L0/L1/L2 computation rules. - [
references/suite-mode.md](references/suite-mode.md) — When to decompose into a Skill Suite and DAG validation.
Security
- Trust Level: L1 (G1 scan integrated; G2 review performed by Agent)
- Allowed Tools: Read, Write, Bash, Glob, Grep
- Network Access: Denied (no network calls in scripts; git clone is the only network operation)
- Filesystem Scope:
$(workspace)/*and the user-specified output directory
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: ForceInjection
- Source: ForceInjection/Repo2Skill
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.