oo-learn-patterns

A setup tool that scans a repository and creates output-pattern files for oo, a command-output summarizer for AI coding agents. The patterns describe the project’s tools and common commands.

In plain words
What is it for?
Use it to detect a project’s toolchain and configure oo for commands such as npm test, pytest, cargo test, go test, Docker, or Terraform.
Why use it?
It reduces long test, build, lint, and deployment logs to shorter summaries that are easier for an agent to use.

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

Made for: Claude Code, Codex.

Per session 74 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,978 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00074 $0.01978
Opus 5 $0.00037 $0.00989
Sonnet 5 $0.00015 $0.00396
Haiku 4.5 $0.00007 $0.00198

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

Security

Grade A, and why

oo-learn-patterns scanned grade A with 1 finding 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| **Unknown** | Anything else (curl, docker, etc.) | Pass through (safe default) |
.claude/skills/oo-learn-patterns/SKILL.md · 257 lines

How it starts

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

oo-learn-patterns

Create project-specific output patterns so oo can compress verbose command output into terse summaries for AI coding agents.

Workflow

1. Detect project root and toolchain

Find the git root (git rev-parse --show-toplevel) and scan for toolchain markers to determine which commands the project uses:

Marker file Commands to pattern
Cargo.toml cargo test, cargo build, cargo clippy, cargo fmt --check
package.json npm test, npm run build, npx jest, npx eslint, npx tsc
pyproject.toml / setup.py / requirements.txt pytest, ruff check, mypy, pip install
go.mod go test ./..., go build ./..., go vet ./...
Makefile / CMakeLists.txt make, cmake --build
Dockerfile / docker-compose.yml docker build, docker compose up
terraform/ / *.tf terraform plan, terraform apply
.github/workflows/ inspect YAML for additional commands

Also check for CI config files (.github/workflows/*.yml, .gitlab-ci.yml, Jenkinsfile) to discover commands actually used in the project.

2. Create the patterns directory

mkdir -p <git-root>/.oo/patterns

3. Author one .toml file per command

For each discovered command, create a pattern file in .oo/patterns/. Name files descriptively: cargo-test.toml, npm-build.toml, etc.

Use the TOML format reference below. Key principles:

  • command_match is a regex tested against the full command string
  • [success] extracts a terse summary from passing output via named captures
  • [failure] filters noisy failure output to show only actionable lines
  • An empty summary = "" suppresses output entirely on success (quiet pass)
  • Omit [failure] to show all output on failure (sensible default)

4. Validate patterns

After creating patterns, verify them:

oo patterns          # lists all loaded patterns (project + user + builtins)
oo <command>         # run a real command to test the pattern

Read the full file on GitHub · 257 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. 2d ago First seen · 257 lines · 74 tokens per session scan A 9ac9985b0170

Subscribe to this mod's changes

oo-learn-patterns is a skill published in the GitHub repository randomm/oo (21 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 74 tokens to every session and 1,978 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). 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

article-writing

Write articles, guides, blog posts, tutorials, newsletter issues, and other long-form content in a distinctive voice derived from supplied examples or brand guidance. Use when the user wants polished written content longer than a paragraph, especially when voice consistency, structure, and credibility matter.

affaan-m/ECC · 57 tokens

a-evolve

Apply A-Evolve's agentic evolution methodology to improve AI agent performance across runs. Use when the user wants to diagnose agent failures, generate targeted skills from error patterns, evolve system prompts, or accumulate episodic knowledge. Works standalone or inside AutoResearchClaw pipelines. Triggers on…

aiming-lab/AutoResearchClaw · 100 tokens

hive.chart-creation-foundations

Required reading whenever any chart tool is available. Teaches the one-tool embedding contract (call chartrender → live chart appears in chat AND a downloadable PNG lands in the queen session dir), the ECharts (data viz) vs Mermaid (structural diagrams) decision, the BI/financial-grade aesthetic baseline (no…

aden-hive/hive · 133 tokens

deck-course-module

暖纸背景 + Playfair, 左侧学习目标常驻, 含 MCQ 自测页.

nexu-io/html-anything · 25 tokens

code-documenter

Use when adding docstrings, creating API documentation, or building documentation sites. Invoke for OpenAPI/Swagger specs, JSDoc, doc portals, tutorials, user guides.

zebbern/claude-code-guide · 39 tokens

creating-skills

Guide for creating Claude Code skills following Anthropic's official best practices. Use when user wants to create a new skill, build a skill, write SKILL.md, update an existing skill, or needs skill creation guidelines. Provides structure, frontmatter fields, naming conventions, and new features like dynamic context…

redai-infra/Relax · 70 tokens