Agent skill

Agent Context Skill

by sopaco in sopaco/terrain

A skill your agent uses when a coding agent needs project source context from Terrain agent assets.

MITAuto-check passedAgent Workflows

Install Agent Context Skill

skills CLI
$ npx skills add sopaco/terrain --skill agent-context-skill -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sopaco/terrain agent-context-skill --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sopaco/terrain.git skills-src && mkdir -p .claude/skills && cp -r skills-src/preset_skills/agent-context-skill .claude/skills/agent-context-skill && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agent-context-skill
GitHub stars
256
Token cost
~486 tokens
SKILL.md length
212 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when a coding agent needs project source context from Terrain agent assets.

  • Works in 4 steps: Read meta — read_agent_pack_meta:… → Grep the pack — grep_agent_pack: search… → Read file slices — read_agent_pack_file:… → …
  • A coding agent needs project source context from Terrain agent assets
  • SKILL.md covers Design intent, When to use, Query strategy (mandatory order) and Terrain Tools (Ask mode), plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Agent Context Skill is an agent skill from sopaco/terrain. Use when a coding agent needs project source context from Terrain agent assets. Guides Repomix pack retrieval on agent/repomix.md without loading the full pack.

Its SKILL.md is about 490 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows, covering Codebase knowledge for agents. The repository describes itself as: AI-native engineering environment management that makes your codebase agent-ready. The licence is MIT.

When your agent uses it

  • A coding agent needs project source context from Terrain agent assets
  • Tasks that involve Codebase knowledge for agents

Example prompts

  • “/agent-context-skill”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Read meta — read_agent_pack_meta: synced_at, total_tokens, top_files_by_tokens, directory_structure, repo_path
  2. Grep the pack — grep_agent_pack: search for types, routes, module names, file paths
  3. Read file slices — read_agent_pack_file: pull the matching ### path section (optional line range)
  4. Never — load all of repomix.md or read the live repo filesystem in Ask mode

What it can do on your machine

Read from SKILL.md and the folder at commit 0746b38. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agent Context Skill loads about 486 tokens when it runs. Until then it costs about 45 tokens; SKILL.md has 212 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~45
When it runs · the whole SKILL.md, loaded when a task matches
~486

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sopaco/terrain at commit 0746b38, republished under its MIT licence (© sopaco). 212 words, ~486 tokens.

Download SKILL.mdSave it as .claude/skills/agent-context-skill/SKILL.md (or your agent's skills folder).
name
agent-context-skill
description
Use when a coding agent needs project source context from Terrain agent assets. Guides Repomix pack retrieval on agent/repomix.md without loading the full pack.
version
1.2.0

Agent Context Skill

Terrain stores an indexed source snapshot at .terrain/agent/repomix.md in the repository, generated by repomix-core (pack_strategy: architecture-context).

Design intent

  • Authoritative source for Ask — read code from the Repomix pack, not the live repository
  • On index — pack is generated automatically when a project is added and initialized
  • Manual refresh — user repacks via 重建源码索引 in the UI after major changes
  • Low context cost — grep and per-file reads; never dump the entire pack

When to use

  • Answering questions about implementation, handlers, types, or routes
  • Locating entry points and module boundaries
  • Cross-file symbol search within the indexed snapshot

Query strategy (mandatory order)

  1. Read meta — read_agent_pack_meta: synced_at, total_tokens, top_files_by_tokens, directory_structure, repo_path
  2. Grep the pack — grep_agent_pack: search for types, routes, module names, file paths
  3. Read file slices — read_agent_pack_file: pull the matching ### path section (optional line range)
  4. Never — load all of repomix.md or read the live repo filesystem in Ask mode

Terrain Tools (Ask mode)

ToolPurpose
read_agent_pack_metaPack metrics, repo path, sync time
grep_agent_packRegex search with context lines in repomix.md
read_agent_pack_fileRead one file (or line range) from the pack
read_docHuman Litho docs under human/
search_knowledgeHuman + structured docs (not the agent pack)

Refresh

Repack when meta.synced_at is stale or after major refactors (UI: 重建源码索引, CLI: terrain assets pack-agent <repo>).

© sopaco, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in preset_skills/agent-context-skill of sopaco/terrain.

Open the folder on GitHubat commit 0746b38

Compare with similar skills

Agent Context Skill next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agent Context Skill compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agent Context Skill this skillsopaco/terrain256—~486Automated safety check: PassMIT
ccc Semantic Code Searchcocoindex-io/cocoindex-code2.7k—~938Automated safety check: PassApache-2.0
Context Engineeringabashev/vfs-s31069 repos~2.6kAutomated safety check: NotesApache-2.0
Repomix Codebase Packeryamadashy/repomix29k—~1.3kAutomated safety check: NotesMIT
Codebase Handbook BuilderRuhan-Wang/Harness_Handbook332—~2.2kAutomated safety check: PassApache-2.0
CodemapJordanCoin/codemap704—~1.8kAutomated safety check: PassMIT

Similar skills

  • ccc Semantic Code Search

    cocoindex-io/cocoindex-code

    Semantic code search and index management with the ccc CLI: the agent initializes, indexes and queries the project by concept, filtering by language or path.

    2.7k GitHub stars~938 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Context Engineering

    abashev/vfs-s3

    Optimizes agent context setup. An agent skill from abashev/vfs-s3.

    106 GitHub starsUsed in 9 repos~2.6k tokens
    Agent WorkflowsAuto-check: notes
  • Repomix Codebase Packer

    yamadashy/repomix

    Packs a local directory or remote GitHub repository into one AI-friendly file with Repomix, then searches it to explore structure, find patterns and count tokens.

    29k GitHub stars~1.3k tokensUpdated 5 days ago
    Agent WorkflowsAuto-check: notes
  • Codebase Handbook Builder

    Ruhan-Wang/Harness_Handbook

    Generates, refreshes, validates and uses a compact handbook that maps where a change touches in a repository, using the active Codex session and no external LLM API.

    332 GitHub stars~2.2k tokensUpdated 1 mo ago
    Agent WorkflowsAuto-check passed
  • Codemap

    JordanCoin/codemap

    Gives an agent a quick map of a codebase's structure, dependencies, changes and handoffs, and tunes per-project config so the output stays code-first.

    704 GitHub stars~1.8k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Repomix Context Skill

    sopaco/deepwiki-rs

    A skill your agent uses when an agent needs source code from the local repomix index under .terrain/agent/repomix.md (not committed; regenerate via Terrain scan).

    3.1k GitHub stars~671 tokensUpdated 24 days ago
    Agent WorkflowsAuto-check passed

More from sopaco/terrain

  • Litho Document Skill

    sopaco/terrain

    This skill should be used when the user asks to "generate project documentation", "analyze codebase architecture", "create C4 architecture diagrams", "document a repository", "generate technical…

    256 GitHub stars~1.4k tokensUpdated 9 days ago
    Auto-check passed
  • Generate architecture-level agent context (no code细节) for Terrain projects.

    256 GitHub stars~1.1k tokensUpdated 9 days ago
    Auto-check passed
  • Terrain Ask Skill

    sopaco/terrain

    Terrain Ask — query knowledge via terrain CLI when Agent execution mode is ACP.

    256 GitHub stars~926 tokensUpdated 9 days ago
    Auto-check passed
  • Sdd Workflow Skill

    sopaco/terrain

    Terrain SDD standardized workflow — requirement clarification, technical design, code generation, and code review.

    256 GitHub stars~447 tokensUpdated 9 days ago
    Auto-check passed

Categories

Questions about Agent Context Skill

What does Agent Context Skill do?

A skill your agent uses when a coding agent needs project source context from Terrain agent assets. Agent Context Skill is an agent skill from sopaco/terrain. Use when a coding agent needs project source context from Terrain agent assets.

When should I use Agent Context Skill?

Agent Context Skill fits situations like: A coding agent needs project source context from Terrain agent assets; tasks that involve Codebase knowledge for agents.

How do I install Agent Context Skill in Claude Code?

Run `npx skills add sopaco/terrain --skill agent-context-skill -a claude-code`. Or copy the skill folder (preset_skills/agent-context-skill in sopaco/terrain) into .claude/skills/agent-context-skill in your project. Claude Code loads it when a task matches its description.

How do I install Agent Context Skill in Codex?

Run `npx skills add sopaco/terrain --skill agent-context-skill -a codex`. Or copy the skill folder (preset_skills/agent-context-skill in sopaco/terrain) into .agents/skills/agent-context-skill in your project. Codex loads it when a task matches its description.

Can I use Agent Context Skill in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sopaco/terrain --skill agent-context-skill -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agent-context-skill, .gemini/skills/agent-context-skill, .github/skills/agent-context-skill and .opencode/skills/agent-context-skill in your project.

What does Agent Context Skill need to run?

SKILL.md names no scripts, command-line tools or credentials: Agent Context Skill is instructions for the agent only.

Does Agent Context Skill access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Agent Context Skill safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Agent Context Skill use?

Agent Context Skill is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agent Context Skill use?

About 486 tokens (SKILL.md is roughly 1.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Agent Context Skill?

Skills that share tags, products or a category with Agent Context Skill: ccc Semantic Code Search (cocoindex-io/cocoindex-code, 2.7k stars), Context Engineering (abashev/vfs-s3, 106 stars), Repomix Codebase Packer (yamadashy/repomix, 29k stars) and Codebase Handbook Builder (Ruhan-Wang/Harness_Handbook, 332 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agent Context Skill?

sopaco (a GitHub user) maintains it in sopaco/terrain, which has 256 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on September 29, 2026.

Source: sopaco/terrain on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.