Agent skill

Mine Claude Md

by ragnar-pwninskjold in ragnar-pwninskjold/tech-snacks

Mine recent Claude Code sessions for non-obvious, multi-file CLAUDE.md candidates, adversarially verify them, and propose paste-ready additions.

MITAuto-check passedAgent Workflows

Install Mine Claude Md

skills CLI
$ npx skills add ragnar-pwninskjold/tech-snacks --skill mine-claude-md -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ragnar-pwninskjold/tech-snacks mine-claude-md --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ragnar-pwninskjold/tech-snacks.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/tech-snacks/skills/mine-claude-md .claude/skills/mine-claude-md && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
mine-claude-md
GitHub stars
137
Token cost
~1k tokens
SKILL.md length
472 words
Files
1
Skills in repo
7
Repo updated
First seen
Licence
MIT

At a glance

Mine recent Claude Code sessions for non-obvious, multi-file CLAUDE.md candidates, adversarially verify them, and propose paste-ready additions.

  • Works in 4 steps: Discover — resolve the session store,… → Mine — parallel miners propose… → Verify — one combined-lens skeptic per… → …
  • The user wants to harvest documentation-worthy patterns/gotchas from past coding sessions into a projects CLAUDE.md
  • SKILL.md covers Requirements (check first), Resolve the bundled workflow…, Gather inputs and Run it, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Mine Claude Md is an agent skill from ragnar-pwninskjold/tech-snacks. Mine recent Claude Code sessions for non-obvious, multi-file CLAUDE.md candidates, adversarially verify them, and propose paste-ready additions. Use when the user wants to harvest documentation-worthy patterns/gotchas from past coding sessions into a project's CLAUDE.md, or says "mine my sessions for CLAUDE.md", "what should be in my CLAUDE.md", "/mine-claude-md".

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Agent instruction files. The repository describes itself as: A skill library for vibe coders that make cool stuff. The licence is MIT.

When your agent uses it

  • The user wants to harvest documentation-worthy patterns/gotchas from past coding sessions into a projects CLAUDE.md
  • Says mine my sessions for CLAUDE.md
  • What should be in my CLAUDE.md
  • /mine-claude-md

Example prompts

  • “s CLAUDE.md, or says”
  • “what should be in my CLAUDE.md”
  • “/mine-claude-md”
  • “/mine-claude-md”

Requirements

  • Pre-approved tools (allowed-tools): Workflow, Bash(echo *)

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Discover — resolve the session store, build one merged, deduped digest of recent sessions
  2. Mine — parallel miners propose non-obvious, multi-file, non-structural candidates.
  3. Verify — one combined-lens skeptic per candidate adversarially tries to break it; survives
  4. Synthesize — assemble survivors into a report with a paste-ready "Suggested CLAUDE.md

What it can do on your machine

Read from SKILL.md and the folder at commit 2d9a73b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Workflow
    • Bash(echo *)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Mine Claude Md loads about 1k tokens when it runs. Until then it costs about 95 tokens; SKILL.md has 472 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~95
When it runs · the whole SKILL.md, loaded when a task matches
~1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ragnar-pwninskjold/tech-snacks at commit 2d9a73b, republished under its MIT licence (© ragnar-pwninskjold). 472 words, ~1,012 tokens.

Download SKILL.mdSave it as .claude/skills/mine-claude-md/SKILL.md (or your agent's skills folder).
name
mine-claude-md
description
Mine recent Claude Code sessions for non-obvious, multi-file CLAUDE.md candidates, adversarially verify them, and propose paste-ready additions. Use when the user wants to harvest documentation-worthy patterns/gotchas from past coding sessions into a project's CLAUDE.md, or says "mine my sessions for CLAUDE.md", "what should be in my CLAUDE.md", "/mine-claude-md".
allowed-tools
Workflow, Bash(echo *)
disable-model-invocation
true

mine-claude-md

Harvest non-obvious knowledge out of a project's recent Claude Code sessions and turn it into proposed CLAUDE.md additions — without inventing anything. This runs a bundled dynamic workflow that mines candidates in parallel, has independent skeptics adversarially challenge each one (reject-by-default), loops until the well runs dry, and synthesizes the survivors into a paste-ready report. It only proposes — it never edits your CLAUDE.md.

Requirements (check first)

This skill drives Claude Code's dynamic workflows feature. Before running, confirm:

  • Claude Code v2.1.154+ and a paid plan (Pro/Max/Team/Enterprise) or API access.
  • Workflows are enabled (/config → Dynamic workflows, or disableWorkflows not set, and CLAUDE_CODE_DISABLE_WORKFLOWS unset).

If workflows are disabled, the Workflow tool call below will fail. If it does, tell the user to enable Dynamic workflows in /config and re-run — do not fall back to doing the mining inline (the whole point is the parallel adversarial-verification harness).

Resolve the bundled workflow path

The orchestration script ships inside this plugin. Resolve its absolute path now — this works whether the plugin is installed at the personal, project, or plugin level, and regardless of the current working directory:

echo "${CLAUDE_SKILL_DIR}/../../workflows/mine-claude-md-from-sessions.workflow.js"

Use the path printed above as the scriptPath argument. Do not retype or guess it.

Gather inputs

Determine the workflow args before launching:

  • projectPath (required): the absolute path to the repo to mine. Default to the current project root (${CLAUDE_PROJECT_DIR} or the cwd) unless the user named a different repo.
  • sessionCount (optional, default 20): how many recent sessions to read.
  • maxRounds (optional, default 6): safety cap on mining rounds.
  • dryRounds (optional, default 2): consecutive empty rounds that mean "done".
  • miners (optional): miners per round; auto-scales 2–4 from session count if omitted.

If projectPath is ambiguous, ask the user once. Otherwise proceed with the current project.

Show full SKILL.md (186 more words)Show less

Run it

Call the Workflow tool with:

  • scriptPath: the absolute path resolved above.
  • args: an object, e.g. { "projectPath": "/abs/path/to/repo", "sessionCount": 20 }.

The run executes in the background across these phases:

  1. Discover — resolve the session store, build one merged, deduped digest of recent sessions (CLAUDE.md included once so nothing re-reads it).
  2. Mine — parallel miners propose non-obvious, multi-file, non-structural candidates.
  3. Verify — one combined-lens skeptic per candidate adversarially tries to break it; survives only if it withstands both the structure lens and the novelty/truth lens.
  4. Synthesize — assemble survivors into a report with a paste-ready "Suggested CLAUDE.md additions" block.

Watch progress with /workflows. When it finishes, present the report to the user. Do not modify CLAUDE.md yourself unless the user explicitly asks you to apply the additions.

What counts as a good candidate

A pattern qualifies only if it is non-obvious (a competent engineer wouldn't guess it from one read), multi-file (needs correlating 2+ locations), not inferable from structure (not from the dir tree, file names, framework conventions, or imports), and not already documented in the current CLAUDE.md. Quality over quantity — zero candidates beats weak ones.

© ragnar-pwninskjold, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/tech-snacks/skills/mine-claude-md of ragnar-pwninskjold/tech-snacks.

Open the folder on GitHubat commit 2d9a73b

Compare with similar skills

Mine Claude Md next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Mine Claude Md compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Mine Claude Md this skillragnar-pwninskjold/tech-snacks137—~1kAutomated safety check: PassMIT
Using Agent Skillsaddyosmani/agent-skills105k4 repos~2.4kAutomated safety check: PassMIT
Claude ReflectBayramAnnakov/claude-reflect1.8k2 repos~627Automated safety check: PassMIT
Writing For Agentsbestofjs/bestofjs3.1k20 repos~2.7kAutomated safety check: PassMIT
Neat-Freak Knowledge CloseoutKKKKhazix/khazix-skills21k—~1.9kAutomated safety check: PassMIT
Task Observerrebelytics/one-skill-to-rule-them-all3.2k1 repos~11kAutomated safety check: PassCC-BY-4.0

Similar skills

  • Using Agent Skills

    addyosmani/agent-skills

    Meta-skill for choosing which workflow skill fits the task at hand, plus always-on habits: surface assumptions, stop on confusion, push back, keep it simple and stay in scope.

    105k GitHub starsUsed in 4 repos~2.4k tokens
    Agent WorkflowsAuto-check passed
  • Claude Reflect

    BayramAnnakov/claude-reflect

    Self-learning system that captures corrections during sessions and reminds users to run /reflect to update CLAUDE.md.

    1.8k GitHub starsUsed in 2 repos~627 tokens
    Agent WorkflowsAuto-check passed
  • Writing For Agents

    bestofjs/bestofjs

    Writing documents for agents. An agent skill from bestofjs/bestofjs.

    3.1k GitHub starsUsed in 20 repos~2.7k tokens
    Agent WorkflowsAuto-check passed
  • Neat-Freak Knowledge Closeout

    KKKKhazix/khazix-skills

    Brings project docs, agent rule files, authorized memory and leftover workspace files back in line with what the code and runtime actually do at the end of a work session.

    21k GitHub stars~1.9k tokensUpdated 10 days ago
    Agent WorkflowsAuto-check passed
  • Task Observer

    rebelytics/one-skill-to-rule-them-all

    Monitors task execution for skill improvement opportunities.

    3.2k GitHub starsUsed in 1 repo~11k tokens
    Agent WorkflowsAuto-check passed
  • SkillOpt Sleep Cycle

    microsoft/SkillOpt

    Official

    Runs an on-demand or nightly sleep cycle that reviews past Claude Code sessions and proposes validated updates to CLAUDE.md and skills.

    18k GitHub stars~2.3k tokensUpdated 4 days ago
    Agent WorkflowsAuto-check passed

More from ragnar-pwninskjold/tech-snacks

  • Prd To UX

    ragnar-pwninskjold/tech-snacks

    A skill your agent uses when translating a PRD, feature spec, or raw product idea into screen-level prompts for web UX generators (Google Stitch, Figma AI, Pencil.dev, Claude Design, v0, or similar).

    137 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Scaffold Claude

    ragnar-pwninskjold/tech-snacks

    A skill your agent uses when the user wants to create, draft, or scaffold a CLAUDE.md (or AGENTS.md) file for their project.

    137 GitHub stars~1.7k tokensUpdated 1 mo ago
    Auto-check passed
  • UI Cloner

    ragnar-pwninskjold/tech-snacks

    A skill your agent uses when user provides a URL and wants to replicate or clone a website's UI, design, or visual style for their own product.

    137 GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • React Refactor Tournament

    ragnar-pwninskjold/tech-snacks

    Review React/Next.js code against the real vercel-react-best-practices skill, backlog the performance findings keyed to actual rule ids + impact tiers, rank the most over-subscribed tiers, then fix…

    137 GitHub stars~1.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Caveman Search

    ragnar-pwninskjold/tech-snacks

    A skill your agent uses when the user wants a terse, opinionated, research-backed answer to a "what tech/tools/stack do I need for X" question, or asks how to approach building something.

    137 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Lite Prd

    ragnar-pwninskjold/tech-snacks

    A skill your agent uses when the user hands you a vague or half-formed feature ask and wants it turned into a lightweight PRD, or asks to "write a PRD", "spec this feature", "flesh this out", or…

    137 GitHub stars~853 tokensUpdated 1 mo ago
    Auto-check passed

Categories

Questions about Mine Claude Md

What does Mine Claude Md do?

Mine recent Claude Code sessions for non-obvious, multi-file CLAUDE.md candidates, adversarially verify them, and propose paste-ready additions. Mine Claude Md is an agent skill from ragnar-pwninskjold/tech-snacks.md candidates, adversarially verify them, and propose paste-ready additions.

When should I use Mine Claude Md?

Mine Claude Md fits situations like: the user wants to harvest documentation-worthy patterns/gotchas from past coding sessions into a projects CLAUDE.md; says mine my sessions for CLAUDE.md; what should be in my CLAUDE.md; /mine-claude-md.

How do I install Mine Claude Md in Claude Code?

Run `npx skills add ragnar-pwninskjold/tech-snacks --skill mine-claude-md -a claude-code`. Or copy the skill folder (plugins/tech-snacks/skills/mine-claude-md in ragnar-pwninskjold/tech-snacks) into .claude/skills/mine-claude-md in your project. Claude Code loads it when a task matches its description.

How do I install Mine Claude Md in Codex?

Run `npx skills add ragnar-pwninskjold/tech-snacks --skill mine-claude-md -a codex`. Or copy the skill folder (plugins/tech-snacks/skills/mine-claude-md in ragnar-pwninskjold/tech-snacks) into .agents/skills/mine-claude-md in your project. Codex loads it when a task matches its description.

Can I use Mine Claude Md in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ragnar-pwninskjold/tech-snacks --skill mine-claude-md -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/mine-claude-md, .gemini/skills/mine-claude-md, .github/skills/mine-claude-md and .opencode/skills/mine-claude-md in your project.

What does Mine Claude Md need to run?

SKILL.md names no scripts, command-line tools or credentials: Mine Claude Md is instructions for the agent only. Its frontmatter pre-approves these tools: Workflow, Bash(echo *).

Does Mine Claude Md access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Mine Claude Md safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Mine Claude Md use?

Mine Claude Md is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Mine Claude Md use?

About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Mine Claude Md?

Skills that share tags, products or a category with Mine Claude Md: Using Agent Skills (addyosmani/agent-skills, 105k stars), Claude Reflect (BayramAnnakov/claude-reflect, 1.8k stars), Writing For Agents (bestofjs/bestofjs, 3.1k stars) and Neat-Freak Knowledge Closeout (KKKKhazix/khazix-skills, 21k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Mine Claude Md?

ragnar-pwninskjold (a GitHub user) maintains it in ragnar-pwninskjold/tech-snacks, which has 137 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on August 18, 2026.

Source: ragnar-pwninskjold/tech-snacks on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.