trpc-group/trpc-agent-go/en
Claude Code and agent skill by trpc-group/trpc-agent-go
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install trpc-group/trpc-agent-go/enSKILL.md
The same SKILL.md was published earlier as trpc-group/trpc-agent-go/en.
Skill
Agent Skills package reusable workflows as folders with a SKILL.md spec plus optional docs and scripts. During a conversation, the agent injects a low‑cost “overview” first, then loads the full body/docs only when actually needed, and runs scripts inside an isolated workspace.
Background references:
- Engineering blog:
https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills
- Open Skills repository (structure to emulate):
https://github.com/anthropics/skills
Overview
🎯 What You Get
- 🔎 Overview injection (name + description) to guide selection
- 📥
skill_loadto pullSKILL.mdbody and selected docs on demand - 📚
skill_select_docsto add/replace/clear docs - 🧾
skill_list_docsto list available docs - 🧪 Execution:
skill_loadmaterializes a writable skill working copy
under /skills/<name>/, and scripts are executed via workspace_exec (available whenever a code executor is configured)
- 🗂️ Output file collection via glob patterns with MIME detection
- 🧩 Pluggable local or container workspace executors (local by default)
Three‑Layer Information Model
1) Initial “overview” (very low cost)
- Inject only
nameanddescriptionfromSKILL.mdinto the
system message so the model knows what skills exist.
2) Full body (on demand)
- When a task truly needs a skill, the model calls
skill_load. The
framework then materializes that skill’s full SKILL.md body into the next model request (see “Prompt Cache” below).
3) Docs/Scripts (selective + isolated execution)
- Docs are included only when requested (via
skill_loador
skill_select_docs). Scripts are not inlined; they are executed inside a workspace, returning results and output files.
Caller-Declared Skill Loads
Applications that already know which skill a request requires can load it without asking the model to choose or call skill_load:
The declarations are validated as one atomic batch against the invocation's effective repository, including context-aware visibility filters. The repository selected during preflight and the validated contents of declared skills are reused for tool construction and request processing throughout that invocation. SKILL.md is always loaded; Docs selects additional skill-relative documents, while IncludeAllDocs selects all supporting documents and cannot be combined with Docs. A non-empty Docs replaces the current document selection. When both fields are unset, the declaration itself leaves any current selection unchanged, matching skill_load. In the default turn mode, the turn reset and declaration are applied atomically; the reset removes the previous turn's selection, so it is not inherited. Modes without a turn reset, including session, preserve a selection that is still present. Equivalent declarations for the same skill are coalesced after normalization, including when separate WithSkillLoads options append them. Equivalence requires the same normalized Docs set and IncludeAllDocs value. Conflicting selections for one skill are invalid, and MaxLoadedSkills counts the coalesced skills. A failed declaration prevents the first model request and can be classified with skill.ErrInvalidLoadRequest or skill.ErrSkillUnavailable when the agent returns the setup error directly. Runner wrappers that execute inner agents asynchronously, such as candidate selection and Ralph Loop, retain their existing error-event delivery semantics while still preventing the model request.
Declared loads use the same state, materialization, load-mode, workspace, and tool-activation behavior as skill_load, but do not fabricate a model tool call or tool result. They apply only to the selected entry invocation and are not inherited by cloned child-agent invocations. A selected agent that does not implement agent.InvocationSkillLoadSupport (or reports false) is rejected with agent.ErrSkillLoadingUnsupported. Custom agents that implement this interface commit to consuming the declarations atomically before their first model request.
Token Cost
If you inline a full skills repo (all SKILL.md bodies and docs) into the prompt up-front, it can dominate your prompt-token budget and even exceed the model context window.
For a reproducible, runtime token comparison (progressive disclosure vs full injection), see trpc-agent-go-benchmark/anthropic_skills/README.md and run the token-report suite described there.
Prompt Cache
Some model providers support prompt caching: if a later model request starts with the exact same tokens as an earlier request, the provider can reuse that shared prefix from cache. This reduces work and can lower latency and/or input token cost (provider-dependent).
For Skills, where the loaded SKILL.md body/docs land in the message sequence affects how long the shared prefix is:
- Legacy behavior (default): loaded skill bodies/docs are appended to the
system message.
- This inserts new tokens before the user message and history,
which can shorten the shared prefix between consecutive model calls.
- Tool-result materialization (optional): loaded skill bodies/docs are
appended to the matching tool result messages (skill_load / skill_select_docs).
- This keeps the system message stable, so earlier messages are less
likely to shift, and prompt caching can often reuse a longer prefix.
Fallback: if the matching tool result message is not present in the request history (for example, history suppression), the framework can fall back to a dedicated system message so the model still sees the loaded content.
Session summary note: if you enable session summary injection (WithAddSessionSummary(true)) and a summary is present, the framework prefers to skip this fallback to avoid re-inflating the prompt with summarized content. If the matching tool result messages are still available, the fallback stays suppressed; if summary compaction removes them, the fallback is re-enabled so the model still sees the full body/docs.
Enable tool-result materialization with: llmagent.WithSkillsLoadedContentInToolResults(true). To restore the legacy fallback behavior in summary mode: llmagent.WithSkipSkillsFallbackOnSessionSummary(false).
To measure the impact in a real tool-using flow, run the trpc-agent-go-benchmark/anthropic_skills prompt-cache suite.
How this relates to SkillLoadMode (common pitfall):
- The cache-prefix discussion above mostly applies to multiple model
calls within the same Runner.Run (one user message triggers a tool loop).
- If you want loaded skill bodies/docs to persist across **multiple
conversation turns**, set SkillLoadMode to session. The default turn mode clears the agent-scoped skill keys (temp:skill:loaded_by_agent:<agent>/<name> and temp:skill:docs_by_agent:<agent>/<name>) before the next run starts. As a result, even if your history still contains the previous skill_load tool result (typically a short loaded: <name> stub), the framework will not materialize the body/docs again.
Offloading also affects prompt caching in tool-result mode. Only skills currently loaded for the agent are materialized; historical tool results do not reactivate offloaded skills, even while another skill remains loaded. After lifecycle cleanup or WithMaxLoadedSkills eviction, the next request keeps the original short tool result instead of the skill body/docs. The system message stays unchanged by this offload when matching tool results remain in history, but the prompt changes at the offloaded tool result: the earlier prefix can still be reused, while the suffix cannot reuse the previous request's corresponding cached prefix. This saves context tokens without guaranteeing a higher cache-hit rate.
Practical guidance (especially with WithSkillsLoadedContentInToolResults(true)):
- First, be clear about which caching scenario you mean:
- Within a single turn (multiple model calls inside one
Runner.Run): turn and session behave similarly because both keep loaded content available within the run. The more important lever is usually where you materialize content (system vs tool result).
- Across turns:
sessioncan be more prompt-cache friendly
because you load once and avoid repeating skill_load every turn. The trade-off is a larger prompt and the need to manage clearing.
- Rule of thumb:
- Default to
turn(least-privilege, smaller prompts, less likely to
trigger truncation/summary).
- Use
sessiononly for a small number of skills you truly need
across the whole session, and keep docs selection tight.
- Keep docs selection tight (avoid
include_all_docswhen possible).
Otherwise the prompt can grow quickly and trigger truncation/summary. That increases the chance of falling back to a system message, which usually reduces prompt-cache benefits.
Session Persistence
It helps to separate two concepts:
- Session (persistent): a stored log of events (user messages,
assistant messages, tool calls/results) plus a small key/value state map.
- Model request (ephemeral): the
[]Messagearray sent to the model
for this call, built from the session + runtime configuration.
skill_load stores only small state keys (loaded flag + doc selection). Request processors then materialize the full SKILL.md body/docs into the next model request.
Important: materialization does not rewrite the session transcript. So if you inspect stored tool results, skill_load typically still looks like a short stub (for example, loaded: internal-comms). The model still sees the expanded body/docs because they are added when building the outbound request.
Note: SkillLoadMode controls the lifecycle of those state keys, so it also determines whether the next turn can keep materializing bodies/docs.
Stability across calls:
- Within a tool loop, the materialization is re-applied deterministically
on every model call, so later requests see the same skill content as long as the skills repo and selection state are unchanged.
- If the relevant tool result message is missing from the request history
(for example, history suppression or truncation), the framework can fall back to a dedicated system message (Loaded skill context:) to preserve correctness. This fallback may reduce prompt-cache benefits because it changes the system content. If a session summary is present, this fallback is skipped by default (see above).
Industry Comparison
Many agent frameworks avoid mutating the system prompt mid-loop. Instead, they fetch dynamic context via a tool and keep that context in tool messages, which is typically more prompt-cache friendly.
Examples:
- OpenClaw: system prompt lists available skills, but the selected
SKILL.md is read via a tool (so the body lands in a tool result): https://github.com/openclaw/openclaw/blob/0cf93b8fa74566258131f9e8ca30f313aac89d26/src/agents/system-prompt.ts
- OpenAI Codex: project docs render a skills list and instruct opening
SKILL.md on demand (skill body comes from a file-read tool result): https://github.com/openai/codex/blob/383b45279efda1ef611a4aa286621815fe656b8a/codex-rs/core/src/project_doc.rs
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingdocs/mkdocs/en/skill.md
Popularity
- Repository stars
- 1,836
- Repository forks
- 322
- 7-day trend score
- 38
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
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/trpc-group/trpc-agent-go/en)