TRIP Compact logo

TRIP Compact

Community
PiLastDigit
TRIP-compact

Compact ARCHI.md when it exceeds recommended size - smart compression without losing relevance; --sync audits it against the codebase instead

Overview

PublisherPiLastDigit
RepositoryTRIP-workflow
Skill nameTRIP-compact
Stars
636
Forks
91
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by PiLastDigit on GitHub. Read the source before you install it.

Installation

Install the TRIP Compact AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/PiLastDigit/TRIP-workflow/tree/master/skills/TRIP-compact
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/PiLastDigit/TRIP-workflow.git /tmp/TRIP-workflow
mkdir -p .claude/skills
cp -r /tmp/TRIP-workflow/skills/TRIP-compact .claude/skills/TRIP-compact
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable TRIP Compact in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads TRIP Compact on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so TRIP Compact is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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:

  1. 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.
  2. Verify each with ls, grep -n, or a manifest lookup (package.json scripts, 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 something ls already answered.
  3. 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:

bash
bash .claude/skills/TRIP-compact/count-tokens.sh docs/ARCHI.md

Then read the full ARCHI.md and evaluate:

  1. 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):

markdown
## Authentication System

The authentication system in this project uses Supabase for managing user
authentication. When a user logs in, the system calls the Supabase auth API
to verify their credentials. After successful authentication, a session is
created and stored. The session token is then used for subsequent API calls
to authenticate the user. We also support role-based access control where
users can have either an ADMIN role or a USER role, which determines what
actions they can perform in the application.

After (dense):

markdown
## Authentication

**Provider**: Supabase Auth
**Flow**: Login → Supabase API → Session created → Token for subsequent calls
**RBAC**: `ADMIN` (full access) | `USER` (read-only library, settings)

2.3 Convert Prose to Structured Formats

  • Use tables instead of paragraphs for comparisons
  • Use bullet points instead of sentences
  • Use code for 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:

markdown
The useTranscription hook manages the transcription state by using useState
for the segments array, useEffect to fetch data when videoId changes, and
useCallback for memoized handlers. It also implements error boundaries...

After:

markdown
`useTranscription`: Orchestrates transcription data fetching and state management

2.5 Summarize File Listings

Before:

markdown
- `src/components/auth/LoginForm.tsx` - Login form component
- `src/components/auth/LogoutButton.tsx` - Logout button component
- `src/components/auth/RegisterForm.tsx` - Registration form component
- `src/components/auth/ForgotPassword.tsx` - Password reset component
- `src/components/auth/AuthProvider.tsx` - Auth context provider

After:

markdown
- `src/components/auth/` - Auth UI components (Login, Logout, Register, ForgotPassword, AuthProvider)

2.6 Use References Instead of Duplication

Instead of explaining the same pattern in multiple places:

markdown
See [Pattern Name](#pattern-name) for details.

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:

bash
bash .claude/skills/TRIP-compact/count-tokens.sh docs/ARCHI.md

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

  1. Density over length - Same information, fewer words
  2. Structure over prose - Tables, bullets, code blocks
  3. References over repetition - Link, don't duplicate
  4. What/Why over How - Architecture, not implementation
  5. Current over historical - Remove obsolete content
  6. Essential over comprehensive - 80/20 rule applies

When to Run This Skill

  • --sync every 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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the TRIP Compact AI skill do?

Compact ARCHI.md when it exceeds recommended size - smart compression without losing relevance; --sync audits it against the codebase instead

Why use TRIP Compact on TypingMind?

Because you install it once and use it with any model. TRIP Compact is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install TRIP Compact in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/PiLastDigit/TRIP-workflow/tree/master/skills/TRIP-compact. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use TRIP Compact?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with TRIP Compact?

As many as you like. As long as a model supports skills, you can use TRIP Compact with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the TRIP Compact AI skill free?

It is published on GitHub by PiLastDigit. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇