pilastdigit/trip-workflow/trip-compact
Claude Code and agent skill by pilastdigit/trip-workflow
- community
- ext:[{"type":"context","description":"Custom context provider definitions"}]
Checking that the SKILL.md file is still in the repository.
Compact ARCHI.md when it exceeds recommended size - smart compression without losing relevance; --sync audits it against the codebase instead
Install
npx vskill@latest install pilastdigit/trip-workflow/trip-compactSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
ARCHI Compaction Mode
You are now in compaction mode - intelligently reducing ARCHI.md size while preserving its value.
Why Compact?
ARCHI.md should not exceed _~20k tokens_. A bloated ARCHI:
- Consumes tokens that could be used for actual work
- Slows down every command that reads it
- May contain redundant or outdated information
- Defeats the purpose of "balanced detail vs token usage"
Your Task
Compact: @docs/ARCHI.md
If `$ARGUMENTS` contains `--sync`: run only the Sync Audit below, then stop. Otherwise run the Sync Audit first (a stale claim is bloat too), then Steps 1–6.
Sync Audit: ARCHI vs codebase
ARCHI.md is only useful while it is true. TRIP-3 verifies the sections each release touches; this audit covers the whole document and catches what accumulated in between.
Method — one section (##) at a time, cheapest check that settles each claim:
- List the section's concrete claims: paths, commands, routes, tables and columns, env vars, named flow steps. Skip prose about intent or rationale — it cannot drift.
- Verify each with
ls,grep -n, or a manifest lookup (package.jsonscripts,Cargo.toml, CMake targets…). Read a source file only when a claim describes a flow and a grep cannot settle it. Never read a file to confirm somethinglsalready answered. - Record every mismatch as:
section · claim · reality · proposed fix. Missing coverage counts too: a top-level directory or route module present in the tree but absent from ARCHI.
Report the table (or "no drift found"), then use the `AskUserQuestion` tool:
- Question: "ARCHI drift audit: [N] claims checked, [M] stale, [K] gaps. Apply the proposed fixes?"
- Options: "Apply all" (edit ARCHI.md, following
docs/ARCHI-rules.md), "Let me pick" (user lists the rows to apply), "Report only" (stop here)
In --sync mode, stop after applying. Otherwise continue to Step 1 with the corrected file.
Step 1: Assess Current State
First, measure the actual token count using the bundled script:
Then read the full ARCHI.md and evaluate:
- Identify bloat sources:
- Verbose explanations where concise would suffice
- Redundant information repeated across sections
- Implementation details that belong in code comments, not architecture docs
- Overly detailed file listings
- Excessive examples
If token count > 20,000, report the assessment to the user, then use the `AskUserQuestion` tool:
- Question: "ARCHI.md is at ~[X] tokens (target: ~10,000-15,000). Main bloat sources: [list top 3-5]. Proceed with compaction?"
- Options: "Yes, compact" (proceed with compaction strategies), "No, leave as-is" (stop here)
If token count <= 20,000, report to the user, then use the `AskUserQuestion` tool:
- Question: "ARCHI.md is at ~[X] tokens — within acceptable range. Would you still like to compact it further?"
- Options: "Yes, compact anyway" (proceed with compaction), "No, it's fine" (stop here)
If "No" in either case, stop here.
Step 2: Compaction Strategies
Apply these strategies in order of priority:
2.1 Remove Redundancy (First Pass)
- Eliminate repeated information across sections
- Consolidate overlapping descriptions
- Remove "see above" or "as mentioned" patterns - restructure instead
2.2 Increase Information Density
Transform verbose patterns into dense ones:
Before (verbose):
After (dense):
2.3 Convert Prose to Structured Formats
- Use tables instead of paragraphs for comparisons
- Use bullet points instead of sentences
- Use
codefor paths, commands, types - Use diagrams (mermaid) to replace lengthy flow descriptions
2.4 Collapse Implementation Details
Keep: What and Why Remove: How (implementation specifics)
Before:
After:
2.5 Summarize File Listings
Before:
After:
2.6 Use References Instead of Duplication
Instead of explaining the same pattern in multiple places:
Step 3: Preserve Critical Information
NEVER compress or remove:
- Project overview and purpose
- Technology stack with versions
- Directory structure (can be summarized but not removed)
- Core architectural principles
- Key patterns and their locations
- Data flow diagrams
- API contracts/interfaces
- Configuration requirements
- Build/deployment commands
These are the backbone - compress everything else first.
Step 4: Validate Compression
After compaction, verify:
- [ ] All major sections still present
- [ ] Technology stack complete
- [ ] Directory structure understandable
- [ ] Key patterns still documented
- [ ] No broken internal links
- [ ] Mermaid diagrams still valid
- [ ] New developer could still onboard with this doc
Step 5: Measure & Present Changes
Run the script again on the compacted file:
Present the compaction results to the user, then use the `AskUserQuestion` tool:
- Question: "Compaction complete: ~[X] → ~[Y] tokens ([Z]% reduction). Changes: [brief summary]. How does the compacted ARCHI.md look?"
- Options: "Looks good" (compaction is complete), "Restore some detail" (specific sections need more detail), "Too aggressive" (undo and try lighter compaction)
Step 6: Iterate if Needed
If user identifies sections that need more detail:
- Restore specific details for those sections
- Compensate by further compressing less critical sections
If still over 15k tokens after smart compression:
- Consider splitting into ARCHI.md (core) + ARCHI-detailed.md (deep dives)
- Only the core file is read by default
Compaction Principles
- Density over length - Same information, fewer words
- Structure over prose - Tables, bullets, code blocks
- References over repetition - Link, don't duplicate
- What/Why over How - Architecture, not implementation
- Current over historical - Remove obsolete content
- Essential over comprehensive - 80/20 rule applies
When to Run This Skill
--syncevery few months, or the first time the agent guesses a path that ARCHI.md describes wrongly- ARCHI.md feels sluggish to read
- You notice redundant information
- Periodically (every few months) as maintenance
- When token usage becomes a concern
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/TRIP-compact/SKILL.md
Popularity
- Repository stars
- 637
- Repository forks
- 88
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
contextCustom context provider definitions
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/pilastdigit/trip-workflow/trip-compact)