- Home
- Skills
- Prompt & Skill Engineering
- prunegraft
prunegraft
Optimize Claude Code by retiring idle skills and grafting new ones from repeated manual workflows.
$5
Works with the AI Agents you already use
prunegraft
Example session with this skill installed
Run prunegraft to see which of my custom Claude Code skills are actually being used and if I should retire any.
- Read your context and instructions
- Compiled the prunegraft
I have analyzed your Claude Code session records. The scan reviewed 14 active skills and identified several candidates for optimization based on your last 30 days of activity.
Prunegraft Usage Report
| Skill Name | Status | Last Used | Recommendation |
|---|---|---|---|
deploy-k8s | Active | 2 days ago | Keep - High utility |
legacy-auth-fix | Idle | 45 days ago | Retire - Not named in recent logs |
generate-readme | Active | 1 day ago | Keep - Used in 8 sessions |
image-resizer | Idle | 60 days ago | Retire - Moved to retired folder |
manual-db-migration | Pattern | N/A | Graft - Detected 4x manual repeats |
Analysis Summary
- Retired:
legacy-auth-fix,image-resizer(moved to~/.claude/skills-retired/). - Grafted: Created candidate for
db-migrate-helperbased on repeated manual SQL sequences. - Improved: Updated
deploy-k8sto include the recent ingress timeout fix found in sessioncc-9283.
Next steps
- Run
node prunegraft.mjs --retire legacy-auth-fix --why "idle for 45 days"to confirm the archival. - Review
~/.claude/prunegraft/LESSONS.mdto see why theimage-resizerwas flagged. - Approve the graft of
db-migrate-helperto automate the recurring migration workflow.
Connects securely to your tools. The creator never sees your data.
About this skill
Managing a growing library of Claude Code skills eventually leads to token bloat and context degradation. Prunegraft solves this by analyzing session history to identify which skills are earning their place and which are wasting resources. It automates the maintenance of your skill folder, ensuring every instruction set is either actively used, archived, or evolved based on actual developer behavior.
What it does
- Usage tracking identifies which skills are frequently invoked and which have sat idle across sessions.
- Automated archiving moves unused skills to a retired directory to save tokens without deleting code.
- Pattern recognition flags manual tasks repeated across multiple sessions as candidates for new skills.
- Dependency mapping detects when skills build on each other to prevent redundant instructions.
- Continuous improvement logs failures and "gotchas" to refine existing skill logic based on real-world errors.
How it works
- Analyze sessions by running the internal script to scan Claude Code logs and generate a usage report.
- Execute pruning by retiring idle skills or explicitly marking essential ones to be kept based on report findings.
- Graft new skills when a manual workflow repeats three or more times and requires complex steps.
- Refine instructions by updating logic when a skill fails or a new edge case is discovered in the session history.
Frameworks & tools
This skill uses a standalone Node.js script that interacts directly with ~/.claude/ session records. It requires no external npm packages and can be executed via standard input.
Why this beats prompting it yourself
Manual cleanup is tedious and prone to accidental deletion of edge-case tools. Prunegraft uses a data-driven approach to prove a skill's value before keeping it, and it enforces a "one procedure, one home" architecture that prevents context-window bloat.
Use cases
- Token optimization by retiring skills that haven't been touched in months.
- Workflow automation by turning a hard-won recurring fix into a permanent skill.
- Skill auditing to see exactly how your agentic tools are interacting.
- Knowledge recovery by restoring retired skills when they are requested again.
Known limitations
Does not delete files permanently. Requires local Node.js to run the analysis script. Only detects patterns within the stored Claude session history.
How to use
Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scanned
Verified clean 1 day ago
- Passed all security checks, Safe to install
Requires