ditto
Use when a user asks to mine or update a private, evidence-backed work profile from local Claude Code, Codex, Copilot CLI, or OpenCode sessions.
- License 许可
- MIT
- 最近更新
- 2026-10-22
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- ditto
- risk
- critical
- tags
- [ "personalization", "context-engineering", "session-mining", "agent-memory" ]
- tools
- [ "claude", "cursor", "gemini", "codex-cli" ]
- author
- ohad6k
- source
- community
- license
- MIT
- category
- agent-behavior
- date_added
- 2026-07-14
- description
- Use when a user asks to mine or update a private, evidence-backed work profile from local Claude Code, Codex, Copilot CLI, or OpenCode sessions.
- source_repo
- ohad6k/ditto
- source_type
- community
- license_source
- https://github.com/ohad6k/ditto/blob/v0.3.6/LICENSE
03 SKILL.md 正文
Ditto
Overview
Ditto mines only the user's words from real local coding-agent session logs and turns repeated, supported patterns into private work, design, and writing profiles. It keeps dated session receipts, rejects authored rules and memory as source evidence, and requires approval before model-backed mining begins.
This standalone skill routes a compatible, already-installed Ditto runtime. Native namespaced routing is available through the upstream Ditto plugin.
When to Use This Skill
- Use when the user explicitly asks to set up, run, update, re-mine, or deepen Ditto.
- Use when the user wants an agent profile derived from real coding-session history rather than a questionnaire or rules file.
- Use when native
ditto:mineis unavailable and the user already has a compatible Ditto runtime installed.
Do not trigger this skill merely because personalization might be useful. Mining requires an explicit user request.
How It Works
1. Resolve an installed runtime
Ask the user for the path to an existing, trusted Ditto runtime, or use the
native upstream plugin when it is already installed. Retain the exact Python 3
executable path as PYTHON3, the runtime path as DITTO_PY, and its matching
MINING_PROMPT.md path. Confirm the installed version and source before use.
Do not download or install executable code as part of this skill. If Ditto is not installed, stop and direct the user to the upstream installation guidance; installation is a separate, explicit decision.
2. Show the read-only mining plan
Mine only real user-authored sessions. Never synthesize a profile from
AGENTS.md, CLAUDE.md, memory files, rules files, or a typed self-description.
Run the full-history quality-default preflight:
"$PYTHON3" "$DITTO_PY" plugin preflight
Show the user the valid session count, post-dedupe source tokens, selected source tokens, cache hits, planned worker calls, and planned reducer calls. Wait for explicit approval of this displayed plan before any model-backed work.
If the user explicitly asks for a quick preview, add --preview and say exactly:
Quick preview creates a starter profile from selected history, not the full profile.
Never present preview as the default or as equivalent to the full-history result.
3. Prepare the approved run
Retain the displayed approval_hash, then prepare with the exact approved mode.
For the full-history plan, run:
"$PYTHON3" "$DITTO_PY" plugin prepare --approved-plan-hash HASH
For an approved quick-preview plan, preserve preview mode explicitly:
"$PYTHON3" "$DITTO_PY" plugin prepare --preview --approved-plan-hash HASH
If the hash changes, show the new plan and obtain approval again. Retain the
returned run_id, assigned segment and report paths, and pack_path.
4. Mine and validate evidence
For every uncached selected segment, run one worker over only that segment and
the per-segment contract in the resolved MINING_PROMPT.md. Cache each JSON
report with plugin cache-report and stop on rejection.
Run one strongest-available reducer over only the validated reports and reducer
contract. Write the complete pack to pack_path, validate it, and activate only
the validated pack with plugin activate.
5. Verify and report
Run plugin status, render the profile card, and report:
- active version and core profile path
- active and inactive domains
- selected source tokens and actual worker/reducer passes
- cache reuse
- card path
- any exact targeted-deepen instruction
If the current host already has the native Ditto plugin, do not create a competing direct profile installation.
Examples
Full-history setup
User: run ditto on my coding history
Agent: resolves the pinned runtime, shows the read-only full-history plan, and
waits for explicit cost approval before starting any mining workers.
Explicit quick preview
User: give me a cheap ditto preview first
Agent: runs preflight with --preview, labels it as a starter profile, and waits
for approval of the displayed preview plan.
Best Practices
- Keep raw sessions, caches, receipts, and generated profiles private by default.
- Report exact observed counts and paths; never estimate provider billing or coverage.
- Preserve the approval hash and mode through the complete run.
- Stop on validation failure instead of activating a partial profile.
- Share the card or a short trait, not the full private profile or receipt appendix.
Limitations
- Ditto models working behavior; it does not make the underlying model smarter.
- Sparse or repetitive histories can leave design or writing domains inactive.
- Provider system prompts, tool traffic, and billing overhead are outside Ditto's exact token accounting.
- Quick preview has lower recall than the full-history quality default.
- Automatic work, design, and writing routing requires the upstream native plugin.
Security & Safety Notes
- This skill does not download executable code; it requires an existing trusted Ditto installation.
- Extraction, redaction, caches, and generated profiles stay local. Selected redacted text is processed by the model provider the user chooses.
- Redaction is best-effort. Tell the user to inspect private output before sharing it.
- Never upload session logs or full profiles to a third party without explicit user approval.
- Installation itself schedules no mining model calls; every prepared mining mode still requires approval of its displayed plan.
Common Pitfalls
-
Problem: No eligible sessions are found.
Solution: Report the supported source locations that were checked and ask whether the user has retained or exported session history.
-
Problem: The approval hash changed.
Solution: Do not reuse the old approval. Show the updated plan and obtain approval again.
-
Problem: A cached or reduced report fails validation.
Solution: Stop, preserve the failure evidence, and never activate the incomplete pack.
Related Skills
@agenttrace-session-audit- Use for cost, latency, failure, and health analysis of coding-agent sessions.@agent-memory- Use for explicit persistent knowledge storage rather than evidence-based profile mining.
04 同仓库更多 Skills
testing-best-practices
Laravel test design and review. Use when selecting coverage, naming or structuring tests, choosing assertions or test data, isolating dependencies, testing HTTP or security boundaries, improving suite performance, or reviewing test value. Use framework guidance or search-docs for Pest and PHPUnit syntax.
tailwindcss-development
Always invoke when the user's message includes 'tailwind' in any form. Also invoke for: building responsive grid layouts (multi-column card grids, product grids), flex/grid page structures (dashboards with sidebars, fixed topbars, mobile-toggle navs), styling UI components (cards, tables, navbars, pricing sections, forms, inputs, badges), adding dark mode variants, fixing spacing or typography, and Tailwind v3/v4 work. The core use case: writing or fixing Tailwind utility classes in HTML templates (Blade, JSX, Vue). Skip for backend PHP logic, database queries, API routes, JavaScript with no HTML/CSS component, CSS file audits, build tool configuration, and vanilla CSS.
laravel-best-practices
Apply this skill whenever writing, reviewing, or refactoring Laravel PHP code. This includes creating or modifying controllers, models, migrations, form requests, policies, jobs, scheduled commands, service classes, and Eloquent queries. Triggers for N+1 and query performance issues, caching strategies, authorization and security patterns, validation, error handling, queue and job configuration, route definitions, and architectural decisions. Also use for Laravel code reviews and refactoring existing Laravel code to follow best practices. Covers any task involving Laravel backend PHP code patterns.
infer-conventions
Use this skill to analyze how a Laravel application is actually written and record its conventions as shared rules. Trigger when the user wants to detect, infer, document, or standardize project conventions or coding style, set up or grow `.ai/rules`, resolve mixed or conflicting patterns (e.g. "are we using Form Requests or inline validation?"), or onboard agents and teammates to "how we do things here". Covers: a systematic sweep of ~49 Laravel convention dimensions (validation, models, architecture, testing, frontend, database, console), open-ended house-pattern discovery, conflict reporting, and recording rules scoped to the right paths via the Boost `record-rule` MCP tool. Only run this skill when the user explicitly asks for it; never start a sweep as part of another task. Do not use for one-off code review, enforcing formatting a linter already handles, or editing `.ai/rules` files by hand.
inertia-react-development
Develops Inertia.js v2 React client-side applications. Activates when creating React pages, forms, or navigation; using <Link>, <Form>, useForm, or router; working with deferred props, prefetching, or polling; or when user mentions React with Inertia, React pages, React forms, or React navigation.
deploying-to-cloud
Deploys and manages Laravel applications on Laravel Cloud using the `cloud` CLI. Use when the user wants to deploy an app, ship to Cloud, create or manage applications, environments, databases, caches, object storage, queues, domains, instances, background processes, secrets, compute, scheduled tasks, or Laravel Cloud infrastructure; or check billing, usage, or spend. Triggers on deployment, shipping, Cloud management, environment setup, database provisioning, billing or usage queries, the `cloud` CLI, and Laravel Cloud deployment troubleshooting.