mine-gemini-workflows
Skill30 starsChanged 37 days agoMITView on GitHub
Discover repeated, validated Gemini CLI workflows from a user-selected session directory and turn approved candidates into portable skills and parity tests without exporting private reasoning.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- starter/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- context-endSkill
- context-setupSkill
- context-startSkill
- context-updateSkill
- endSkill
- migrate-geminiSkill
- setupSkill
- startSkill
- updateSkill
- skill-creatorSkill
- contextos-workspaceSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use session evidence to find workflows worth porting.
- Distinctive: line 13
Run the metadata-only pass first.
- Distinctive: line 14
Do not extract or summarize private thoughts, reasoning fields, tool arguments, secrets, or complete transcripts.
- Very specific: line 15
Do not commit .context-os/migrations/ or raw Gemini recordings.
- Very specific: line 16
Ask before any --include-content, --include-summaries, or --include-paths pass and explain exactly which selected sessions will be read.
- Distinctive: line 23
Ask the user for the relevant Gemini project/session directory and optional date boundary.
- Very specific: line 35
Add --since YYYY-MM-DD when the user supplied a date boundary.
- Distinctive: line 43
use a stable tool sequence,
- Distinctive: line 46
Do not promote one-off activity or a repeated failure.
- Very specific: line 57
add a thin .claude/commands/<workflow>.md adapter only if a Claude slash command is wanted,
- Very specific: line 58
create a parity case from docs/templates/workflow-parity.json,
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Mine Gemini workflows
Use session evidence to find workflows worth porting. This is workflow archaeology, not a bulk conversation export.
Non-negotiable privacy boundaries
- Require one explicitly selected Gemini project/session directory. Never crawl the entire home directory by default.
- Run the metadata-only pass first.
- Do not extract or summarize private thoughts, reasoning fields, tool arguments, secrets, or complete transcripts.
- Do not commit
.context-os/migrations/or raw Gemini recordings. - Ask before any
--include-content,--include-summaries, or--include-pathspass and explain exactly which selected sessions will be read. - A repeated pattern is a candidate, not authorization to create or install a skill.
Procedure
1. Select evidence
Ask the user for the relevant Gemini project/session directory and optional date boundary. If they do not know the directory, help them locate candidate directories using names and modification dates only; do not read session bodies during discovery.
2. Create a metadata-only inventory
Run:
python3 scripts/mine-gemini-workflows.py \
<selected-session-directory> \
--output .context-os/migrations/<timestamp>/gemini-inventory.jsonAdd --since YYYY-MM-DD when the user supplied a date boundary. The default report includes tool names, validation status, file basenames, and session identifiers. It excludes message text, free-form workflow summaries, tool arguments, and full paths.
3. Rank candidates
Prioritize candidates that:
- occur with positive validation in at least two sessions,
- have successful validation evidence,
- use a stable tool sequence,
- solve a task the user expects to repeat.
Do not promote one-off activity or a repeated failure. Present the ranked candidates and evidence counts, then ask the user which ones to inspect.
4. Inspect only selected sessions
If metadata is insufficient, name the exact selected session IDs and ask permission to rerun with repeated --session-id <id> selectors plus only the required opt-in flag (--include-summaries, --include-paths, or --include-content). Content redaction is best-effort, not a guarantee; treat every opt-in report as sensitive. Thought/reasoning fields remain excluded. Review the output again before sharing or persisting it.
5. Draft, do not silently install
For each approved candidate:
- draft
.agents/skills/<workflow>/SKILL.mdas the portable core, - add a thin
.claude/commands/<workflow>.mdadapter only if a Claude slash command is wanted, - create a parity case from
docs/templates/workflow-parity.json, - record provenance using session IDs, immutable recording digests, and evidence counts, not transcript content,
- separate provider-neutral steps from Gemini-, Claude-, or Codex-specific tool adapters.
Show the draft and parity case before writing. Then run
bash scripts/validate-all.sh --workspace.
6. Report limitations
State what the miner could not infer, including missing memory scratchpads, unsupported recording variants, unavailable tools, ambiguous validation, or workflows that need human judgment.
Prior art
See references/ai-data-extraction.md. The linked extractor informed the inventory-first approach, but is not a dependency and should not be run against current recordings without format and privacy review.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

