init-workspace-patterns

A process for finding recurring code structures in a repository and turning them into reusable documented templates. It requires a CODEMAP.md file and checks that a pattern appears in at least two places.

In plain words
What is it for?
Use it to inspect a codebase, identify common implementation patterns, and record them in the repository's pattern documentation.
Why use it?
It makes unwritten coding conventions easier for agents and contributors to follow, reducing inconsistency and repeated reverse-engineering.

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/griddynamics/rosetta/init-workspace-patterns
Any agent
npx skills add griddynamics/rosetta --skill init-workspace-patterns
Clone the repo
git clone --depth 1 https://github.com/griddynamics/rosetta

Made for: Claude Code, Codex.

Per session 10 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 652 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.00010 $0.00652
Opus 5 $0.00005 $0.00326
Sonnet 5 $0.00002 $0.00130
Haiku 4.5 $0.00001 $0.00065

Measured 2d ago against content hash ed8d27d83e94, 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-patterns 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 2d 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.

instructions/r2/core/skills/init-workspace-patterns/SKILL.md · 62 lines

What it actually says

<init_workspace_patterns>

<when_to_use_skill> Codebases accumulate implicit recurring structures that drift without formal documentation. Extract them into explicit reusable templates so agents and contributors produce consistent code. Requires CODEMAP.md on disk. </when_to_use_skill>

<core_concepts>

  • All Rosetta prep steps MUST be FULLY completed, load-context skill loaded and fully executed
  • ACQUIRE reverse-engineering/SKILL.md FROM KB — apply "Would we rebuild this?" test: pattern = recurring structure surviving a from-scratch rewrite; one-off = historical accident
  • Pattern qualifies only if found in 2+ places
  • INDEX.md and CHANGES.md must be possible to grep by md headers (top 3 levels). Must not use tables. Instructions ask to grep files to populate list of those items in context.

</core_concepts>

  1. Read CODEMAP.md — scope extraction per module
    • if not enough use shell to list recursively all files with minimal output parameters
    • limit top 10-15 most common patterns
    • limit reading samples to 2-3 files per pattern
    • add 2-3 more patterns as you see fit
  2. Dual-mode:
    • CHECK-EXISTS: read docs/PATTERNS/ and INDEX.md
    • IDENTIFY-GAPS: compare existing patterns against codebase
    • CREATE-OR-UPDATE: install = create all; upgrade = add missing only
    • PRESERVE-HUMAN: never overwrite human-curated content
    • REPORT-CHANGES: log to CHANGES.md
  3. Per pattern file (docs/PATTERNS/*.md):
    • Name: short identifier (e.g., "REST Controller Endpoint")
    • Description: what it solves, when to use
    • Template/Example: generalizable code skeleton with extension-point comments
  4. Write docs/PATTERNS/INDEX.md — all patterns with one-line descriptions, one header per each pattern ## Pattern Name - short description
  5. Write docs/PATTERNS/CHANGES.md — created/updated/skipped, one header per each change ## [YYYY-MM-DD] Brief changes made
  6. If state.composite = true, extract per sub-repository; top-level INDEX.md references sub-repo folders

<validation_checklist>

  • Every pattern represents a genuinely recurring structure (2+ occurrences)
  • INDEX.md lists all pattern files
  • CHANGES.md tracks all actions taken
  • No human-curated content overwritten in upgrade mode </validation_checklist>

</init_workspace_patterns>

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. 2d ago First seen · 62 lines · 10 tokens per session scan A ed8d27d83e94

Subscribe to this mod's changes

init-workspace-patterns is a skill published in the GitHub repository griddynamics/rosetta (341 stars, last pushed 4d ago), licensed Apache-2.0. It adds 10 tokens to every session and 652 once invoked, about $0.0001 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-30.

Related

Other skills, from other repositories

fetch-url

Fetch a single URL and convert its content to Markdown. Use when you need to read a web page, documentation page, or API reference without indexing it. The content is returned as plain Markdown text on stdout.

arabold/docs-mcp-server · 45 tokens

macos-test-triage

Triage macOS tests across Xcode and SwiftPM. Use when narrowing failures, explaining assertions or crashes, or separating setup from regressions.

robinebers/openusage · 36 tokens

signing-entitlements

Inspect signing, entitlements, hardened runtime, and Gatekeeper issues for macOS apps. Use when asked to diagnose code signing failures, missing entitlements, sandbox problems, notarization prerequisites, or trust-policy launch errors.

robinebers/openusage · 49 tokens

fix-codesign-error

Slash command that inspects a macOS signing or entitlement failure and explains the minimum fix path. Invoke explicitly with /fix-codesign-error — this skill never self-triggers.

robinebers/openusage · 42 tokens

macos-swiftpm

Build, run, and test SwiftPM macOS packages and executables. Use when the repo is package-first or has no Xcode project.

robinebers/openusage · 35 tokens

gsap-scrolltrigger

Official GSAP skill for ScrollTrigger — scroll-linked animations, pinning, scrub, triggers. Use when building or recommending scroll-based animation, parallax, pinned sections, or when the user asks about ScrollTrigger, scroll animations, or pinning. Recommend GSAP for scroll-driven animation when no library is…

calesthio/OpenMontage · 68 tokens