prunegraft

    1

    Optimize Claude Code by retiring idle skills and grafting new ones from repeated manual workflows.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    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 NameStatusLast UsedRecommendation
    deploy-k8sActive2 days agoKeep - High utility
    legacy-auth-fixIdle45 days agoRetire - Not named in recent logs
    generate-readmeActive1 day agoKeep - Used in 8 sessions
    image-resizerIdle60 days agoRetire - Moved to retired folder
    manual-db-migrationPatternN/AGraft - Detected 4x manual repeats

    Analysis Summary

    • Retired: legacy-auth-fix, image-resizer (moved to ~/.claude/skills-retired/).
    • Grafted: Created candidate for db-migrate-helper based on repeated manual SQL sequences.
    • Improved: Updated deploy-k8s to include the recent ingress timeout fix found in session cc-9283.

    Next steps

    1. Run node prunegraft.mjs --retire legacy-auth-fix --why "idle for 45 days" to confirm the archival.
    2. Review ~/.claude/prunegraft/LESSONS.md to see why the image-resizer was flagged.
    3. Approve the graft of db-migrate-helper to 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

    1. Analyze sessions by running the internal script to scan Claude Code logs and generate a usage report.
    2. Execute pruning by retiring idle skills or explicitly marking essential ones to be kept based on report findings.
    3. Graft new skills when a manual workflow repeats three or more times and requires complex steps.
    4. 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

    Windows
    Python
    Node.js
    Git

    Listed1 day ago

    What's inside

    Frequently Asked Questions