Agent skill

Terrain Ask Skill

by sopaco in sopaco/terrain

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

MITAuto-check passedDevelopment

Install Terrain Ask Skill

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

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

GitHub CLI
$ gh skill install sopaco/terrain terrain-ask-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/terrain-ask-skill .claude/skills/terrain-ask-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
terrain-ask-skill
GitHub stars
256
Token cost
~926 tokens
SKILL.md length
315 words
Files
1
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

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

  • Works in 5 steps: Use macro context from the user message… → For architecture sections not preloaded… → For implementation → grep-pack with a… → …
  • Development work in your project
  • SKILL.md covers Resolve the Terrain CLI, Storage model, Environment variables (set by… and Three layers (same as native…, plus 3 more sections
  • Calls bunx and npx

What it does

Terrain Ask Skill is an agent skill from sopaco/terrain. Terrain Ask — query knowledge via terrain CLI when Agent execution mode is ACP.

Its SKILL.md is about 930 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 Development. It works with Git, Bash and Bun. 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

  • Development work in your project

Example prompts

  • “/terrain-ask-skill”

Requirements

  • Node.js

Workflow steps

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

  1. Use macro context from the user message when sufficient.
  2. For architecture sections not preloaded → read-context --section "…".
  3. For implementation → grep-pack with a focused pattern, then read-pack-file with line range.
  4. Cite paths as src/foo.rs:42 from pack line numbers.
  5. Do not run identical CLI commands twice with the same arguments.

What it can do on your machine

Read from SKILL.md and the folder at commit 42f7e72. 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

    Shell commands in SKILL.md call:

    • bunx
    • npx

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

  • Network

    No URLs in SKILL.md. Its commands use bunx and npx, which can reach the network depending on how they are called.

    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

Terrain Ask Skill loads about 926 tokens when it runs. Until then it costs about 24 tokens; SKILL.md has 315 words of instructions outside code blocks.

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

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 42f7e72, republished under its MIT licence (© sopaco). 315 words, ~926 tokens.

Download SKILL.mdSave it as .claude/skills/terrain-ask-skill/SKILL.md (or your agent's skills folder).
name
terrain-ask-skill
description
Terrain Ask — query knowledge via terrain CLI when Agent execution mode is ACP.
version
1.2.0

Terrain Ask (ACP mode)

When Terrain runs in ACP Agent execution mode, built-in function tools are unavailable for Ask. Use the terrain tools CLI to access the same knowledge layers.

Resolve the Terrain CLI

Use conventional paths only — never machine-specific absolute paths like /Users/....

On Windows, tools deploy to %USERPROFILE%\.terrain\bin\ (also ~/.terrain/bin/ in Git Bash / PowerShell 7+). Binaries use .exe extensions.

PriorityCommandWhen
1~/.terrain/bin/terrainTerrain desktop / env integration (see existence check below)
2bunx @terrain-ai/cliNo Terrain install; needs network once
3npx @terrain-ai/cliSame as bunx if Bun unavailable

Existence check:

ShellCheck
bash / Git Bash[ -x ~/.terrain/bin/terrain ] || [ -x ~/.terrain/bin/terrain.exe ]
PowerShellTest-Path "$HOME\.terrain\bin\terrain.exe"

In examples below, <terrain> means your resolved prefix (~/.terrain/bin/terrain or bunx @terrain-ai/cli).

Storage model

Each project's knowledge lives at {repo}/.terrain/ (versioned with the repository). The desktop app keeps a local registry at ~/.terrain/registry.json — only repo pointers, not knowledge files.

Environment variables (set by Terrain)

VariablePurpose
TERRAIN_KNOWLEDGE_ROOTCurrent project's .terrain/ directory
TERRAIN_PROJECT_SLUGCurrent project slug
TERRAIN_REPO_PATHRepository root (for citations)
TERRAIN_ASK_SKILLAsk skill directory

CLI without Terrain UI: run inside a Git workspace, or pass --repo-path / set TERRAIN_REPO_PATH.

Three layers (same as native Ask)

LayerCLIWhen
Macro(preloaded in prompt)Architecture overview — answer from prompt first
Mesoterrain tools read-contextOne section of agent/context.md
Microgrep-pack → read-pack-fileSource code from repomix pack

Never read the live repository filesystem. The repomix pack is authoritative for code.

CLI reference

All commands output JSON to stdout.

bash
# From repository root (auto-detects workspace), or:
# <terrain> --repo-path /path/to/repo tools ...

# List indexed projects
<terrain> tools list-projects

# Repomix pack metadata
<terrain> tools pack-meta --project {slug}

# Grep agent/repomix.md
<terrain> tools grep-pack --project {slug} --pattern "struct Foo"

# Read a file slice from the pack (≤150 lines recommended)
<terrain> tools read-pack-file --project {slug} --file src/main.rs --start-line 1 --end-line 80

# Architecture context (optional section)
<terrain> tools read-context --project {slug}
<terrain> tools read-context --project {slug} --section "核心流程"

# Human / structured docs (paths relative to .terrain/)
<terrain> tools search --query "authentication" --project {slug}
<terrain> tools read-doc --project {slug} --path human/1.概述.md

Workflow

  1. Use macro context from the user message when sufficient.
  2. For architecture sections not preloaded → read-context --section "…".
  3. For implementation → grep-pack with a focused pattern, then read-pack-file with line range.
  4. Cite paths as src/foo.rs:42 from pack line numbers.
  5. Do not run identical CLI commands twice with the same arguments.

Limits

  • read-pack-file: pass --start-line and --end-line; max ~150 lines per call.
  • search: limit 5–10 hits for Ask.
  • Do not dump entire repomix.md.

© 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/terrain-ask-skill of sopaco/terrain.

Open the folder on GitHubat commit 42f7e72

Compare with similar skills

Terrain Ask 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.

Terrain Ask Skill compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Terrain Ask Skill this skillsopaco/terrain256—~926Automated safety check: PassMIT
Rtk Skillsopaco/deepwiki-rs3.1k—~1.4kAutomated safety check: PassMIT
Dirextalk DeployerYingSuiAI/dirextalk-deployer457—~7.2kAutomated safety check: PassMIT
Cursor Composer Task DelegateChachamaru127/claude-code-harness3.2k—~4.4kAutomated safety check: NotesMIT
Gridbash Panesjasonsuhari/gridbash134—~1.5kAutomated safety check: PassMIT
Niubashunixwin/niubash158—~2.1kAutomated safety check: PassMIT

Similar skills

  • Rtk Skill

    sopaco/deepwiki-rs

    A skill your agent uses when running shell commands that produce verbose output (git, test, build, lint, package managers, docker).

    3.1k GitHub stars~1.4k tokensUpdated 25 days ago
    DevOps & CloudAuto-check passed
  • Dirextalk Deployer

    YingSuiAI/dirextalk-deployer

    Deploy, resume, verify, update, recover, reset, or destroy production Dirextalk services and nodes on AWS, and wire local agent runtimes.

    457 GitHub stars~7.2k tokensUpdated 1 mo ago
    DevelopmentAuto-check passed
  • Cursor Composer Task Delegate

    Chachamaru127/claude-code-harness

    Hands one implementation task to Cursor Composer in an isolated git worktree, then reviews its diff and cherry-picks the result into the main branch.

    3.2k GitHub stars~4.4k tokensUpdated 4 days ago
    DevelopmentAuto-check: notes
  • Gridbash Panes

    jasonsuhari/gridbash

    Coordinate with sibling agent panes from inside a GridBash grid — list panes and their roles, read what a pane is currently doing, prompt one pane or every other pane, and rename pane titles so the…

    134 GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Niubash

    unixwin/niubash

    Run Windows tasks in Niubash, the GNU Bash-compatible Windows-native shell.

    158 GitHub stars~2.1k tokensUpdated 4 days ago
    DevelopmentAuto-check passed
  • Dirextalk Deployer

    YingSuiAI/dirextalk-deployer

    Deploy, resume, verify, update, recover, reset, or destroy production Dirextalk services and nodes on AWS.

    457 GitHub stars~541 tokensUpdated 1 mo ago
    DevelopmentAuto-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 today
    Auto-check passed
  • Generate architecture-level agent context (no code细节) for Terrain projects.

    256 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Skill

    sopaco/terrain

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

    256 GitHub stars~486 tokensUpdated today
    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 today
    Auto-check passed

Works with

Categories

Questions about Terrain Ask Skill

What does Terrain Ask Skill do?

Terrain Ask — query knowledge via terrain CLI when Agent execution mode is ACP. Terrain Ask Skill is an agent skill from sopaco/terrain. Terrain Ask — query knowledge via terrain CLI when Agent execution mode is ACP.

When should I use Terrain Ask Skill?

Terrain Ask Skill fits situations like: development work in your project.

How do I install Terrain Ask Skill in Claude Code?

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

How do I install Terrain Ask Skill in Codex?

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

Can I use Terrain Ask 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 terrain-ask-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/terrain-ask-skill, .gemini/skills/terrain-ask-skill, .github/skills/terrain-ask-skill and .opencode/skills/terrain-ask-skill in your project.

What does Terrain Ask Skill need to run?

Going by SKILL.md and its folder, Terrain Ask Skill needs the command-line tools its instructions call (bunx and npx). Our summary lists: Node.js.

Does Terrain Ask Skill access the network?

SKILL.md contains no URLs. Its commands use npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Terrain Ask 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 Terrain Ask Skill use?

Terrain Ask 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 Terrain Ask Skill use?

About 926 tokens (SKILL.md is roughly 3.7k 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 Terrain Ask Skill?

Skills that share tags, products or a category with Terrain Ask Skill: Rtk Skill (sopaco/deepwiki-rs, 3.1k stars), Dirextalk Deployer (YingSuiAI/dirextalk-deployer, 457 stars), Cursor Composer Task Delegate (Chachamaru127/claude-code-harness, 3.2k stars) and Gridbash Panes (jasonsuhari/gridbash, 134 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Terrain Ask 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 October 9, 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.