init-workspace

init-workspace is a skill for Claude Code, Codex from terva-sh/terva. It costs 58 tokens per session (941 once invoked), scanned A, original, MIT.

A workspace setup process that surveys a repository and creates or updates AGENTS.md, the file containing instructions loaded into coding-agent sessions. It accounts for instruction files at different directory levels, including monorepos, which contain multiple projects in one repository.

In plain words
What is it for?
Use it when onboarding a repository, initializing a workspace, or refreshing its AGENTS.md instructions.
Why use it?
It prevents agents from working without the repository’s build commands, layout, testing rules, and local conventions.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/terva-sh/terva/init-workspace
Any agent
npx skills add terva-sh/terva --skill init-workspace
Clone the repo
git clone --depth 1 https://github.com/terva-sh/terva

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for init-workspace

README.md
[![agentmods](https://agentmods.dev/badge/skills/terva-sh/terva/init-workspace.svg)](https://agentmods.dev/skills/terva-sh/terva/init-workspace)
Your own site
<a href="https://agentmods.dev/skills/terva-sh/terva/init-workspace"><img src="https://agentmods.dev/badge/skills/terva-sh/terva/init-workspace.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 941 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00058 $0.00941
Opus 5 $0.00029 $0.00470
Sonnet 5 $0.00012 $0.00188
Haiku 4.5 $0.00006 $0.00094

Measured 5d ago against content hash a47874f6d577, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

init-workspace scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/agent/skills/builtin/init-workspace/SKILL.md · 84 lines

How it starts

The opening of the file, as written. The whole thing — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Initialize a workspace

Write the repository AGENTS.md: the standing instructions that terva loads into every session that works here. The file rides every prompt, so every line must earn its place. This skill is as much about what to leave out as what to put in.

How terva loads it: $TERVA_HOME/AGENTS.md (the user's own cross-repo preferences) first, then AGENTS.md files from the top-most parent directory down to the working directory. A later file overrides an earlier one. So: repository facts go in the repository AGENTS.md. Personal preferences go in the global one. A subdirectory of a monorepo can layer its own on top. Do not mix these scopes.

Survey before you write

Read, do not guess. In order:

  1. Existing instructions: AGENTS.md first, then any sibling instruction files other tools left behind (CLAUDE.md, .cursorrules, CONTRIBUTING). Mine them. If a CLAUDE.md duplicates what you will write, say so to the user. Do not silently fork the two.
  2. The build system: justfile or Makefile, package.json scripts, CI workflow files. These are the source of truth for commands.
  3. The layout: top-level directories, and where the code, the tests, and the documentation live.
  4. Convention signals: linter and formatter configuration, and a few representative source files for naming and comment style.

Verify every command you intend to record: run it. When a run is too heavy (a full test suite), confirm the command exists in the build file and say which. A stale command in AGENTS.md is worse than none: it fails in every future session.

What belongs (and what does not)

In, roughly in this order:

  • Commands: build, test (and how to run one test), lint, format, run. One line each.
  • Architecture in five lines: the map a newcomer needs before their first edit. Major components and where they live. Not a tour.
  • Conventions that differ from defaults: what a competent agent would otherwise get wrong. House style the linter already enforces needs no restatement.
  • Policy: what must not change or go into a commit (generated files, vendored trees, secrets), and the required workflow (branch rules, how a PR opens).
  • Gotchas: the traps that cost someone an hour. One line each, with the tell that identifies the trap.

Read the full file on GitHub · 84 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 84 lines · 58 tokens per session scan A a47874f6d577

Subscribe to this mod's changes

init-workspace is a skill published in the GitHub repository terva-sh/terva (2 stars, last pushed 3d ago), licensed MIT. It adds 58 tokens to every session and 941 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

pi-sync

Daily upstream-sync job for the pi Go port — fetch upstream pi, triage every change since the recorded pin, port what's in scope, verify idiomatic + parity via independent reviews, update the ledger, and push. Use for "sync with upstream", "porting job", or as the scheduled daily run.

sky-valley/pi · 66 tokens

pi-go-review

Review ported Go code for idiomatic quality — that the port maximizes Go rather than transliterating TypeScript. Use after porting upstream pi changes, or standalone on any diff in this repo.

sky-valley/pi · 45 tokens

use-modern-go

Use the Modern Go Guidelines CLI whenever writing, modifying, fixing, or refactoring Go code. Apply its version-specific guidance to generated changes.

JetBrains/go-modern-guidelines · 32 tokens

modern-go

Modernize Go code by applying version-appropriate idioms and APIs (gofix-style transformations). Scans go.mod for the Go version, then transforms Go source files to use modern patterns—from Go 1.0 through 1.26+. Use when the user says "现代化","现代Go语言", "地道的", "idiomatic", "modernize", "modern-go", "update Go code"…

smallnest/pigo · 102 tokens

code-guidelines-go

Go 1.24–1.27 coding guidelines for the dimetron/pi-go AI agent runtime. Use this skill whenever writing, reviewing, or refactoring ANY Go code in pi-go. This covers idiomatic style, error handling, concurrency, project layout, testing (table-driven, fuzz, benchmarks, synctest), new stdlib usage, golangci-lint v2…

dimetron/pi-go · 124 tokens

go-127

What changed in Go 1.27 (released August 2026) and how it changes the way Go is written in pi-go. Use this skill when writing or reviewing Go that could use a 1.27 feature, when bumping the go directive in go.mod, when a build or test behaves differently after a toolchain upgrade, or when code-guidelines-go points…

dimetron/pi-go · 177 tokens