Init tech declaration
Skill kulapoo/opencode-agent-harness/.opencode/skills/init-tech-declaration
Detects the project's tech and writes a `.opencode/harness/rules/tech.md` router so future sessions skip runtime detection and lazy-load the right conventions. Run once when adopting the harness, and again whenever the tech changes. Triggers on "init tech", "declare my tech", "refresh tech declaration".From its SKILL.md
npx -y skills add kulapoo/opencode-agent-harness --skill init-tech-declarationAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
4.8 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it
Init Tech Declaration
Generates or refreshes .opencode/harness/rules/tech.md — the lazy-load router
for the project's tech conventions. This file is injected into every session via
the config instructions array and survives compaction.
When to Use
- First time adopting this harness on a project
- Adding or removing a tech (e.g. new frontend, dropped service)
- Drift detected ("router says rust, but .py files are being edited")
- Major refactor that restructured directories
Steps
- Run detect-tech.md (manifest glob + proximity, Steps 1–3) from this skill's
directory:
Read .opencode/skills/init-tech-declaration/detect-tech.md. - Map detected tech to dir names (e.g.
Cargo.toml→rust,package.jsonwithreactdep →react). JS/TS framework detection is inlined in detect-tech.md; non-JS/TS uses the manifest → tech-dir table inlined there. When a framework is detected inside a language (e.g. FastAPI in Python), record it as a hint:python (fastapi). - Write the result to
.opencode/harness/rules/tech.mdas a lazy-load router — each entry tells the agent which files to Read before writing code in that stack:## Tech Conventions are loaded lazily — this file is the router, not the content. BEFORE writing or modifying code in a stack below, Read the matching files: - `rust` → `.opencode/harness/tech/rust/*.md` + `.opencode/harness/tech/common/*.md` - `python (fastapi)` → `.opencode/harness/tech/python/*.md` + `.opencode/harness/tech/common/*.md` - `react` → `.opencode/harness/tech/react/*.md` + `.opencode/harness/tech/common/*.md` Polyglot: when a task spans multiple stacks, load each stack's conventions and apply each to its own code. Do not mix conventions across boundaries. Other folders under `.opencode/harness/tech/` stay dormant — add them above to activate. Run the `init-tech-declaration` skill to detect and declare stacks. - Ensure the config file wires
tech.mdintoinstructions. Check for any of these filenames in the project root (first match wins):opencode.json,opencode.jsonc,.opencode.jsonc. If the config file exists but has noinstructionskey (orinstructionsdoes not include the tech.md path), add.opencode/harness/rules/tech.mdto the array — preserve every other key. If no config file exists, create.opencode.jsonc:{ "$schema": "https://opencode.ai/config.json", "instructions": [".opencode/harness/rules/tech.md"] } - Opt-in always-load (single-stack only). If the project uses exactly one
tech stack, ask the user whether to also load that stack's conventions into
every session via
instructionsglobs (trades context budget for guaranteed enforcement). If yes, append the stack's glob:
For polyglot projects, skip this — the lazy router is the right default."instructions": [ ".opencode/harness/rules/tech.md", ".opencode/harness/tech/rust/*.md", ".opencode/harness/tech/common/*.md" ] - Show the user a diff before writing. Do not silently modify files.
- Report: which tech dirs exist vs missing (missing → falls back to
common/); config wiring status; whether always-load was applied.
Output
A .opencode/harness/rules/tech.md router file + an instructions entry in the
config. Example router for a Rust + React monorepo:
## Tech
Conventions are loaded lazily — this file is the router, not the content.
BEFORE writing or modifying code in a stack below, Read the matching files:
- `rust` → `.opencode/harness/tech/rust/*.md` + `.opencode/harness/tech/common/*.md`
- `react` → `.opencode/harness/tech/react/*.md` + `.opencode/harness/tech/common/*.md`
Polyglot: when a task spans multiple stacks, load each stack's conventions and
apply each to its own code. Do not mix conventions across boundaries.
Other folders under `.opencode/harness/tech/` stay dormant — add them above to
activate. Run the `init-tech-declaration` skill to detect and declare stacks.
Notes
- Safe to re-run; idempotent.
- If detection finds nothing recognizable, write a router with only
commonand warn the user. - The detection machinery (
detect-tech.md) is a tool, not a runtime step. - The
/adoptcommand orchestrates this skill as part of full harness setup; it also scaffolds a projectAGENTS.mdfromAGENTS.template.mdin this folder.
What ships with it: 2 files
8.8 KB alongside SKILL.md
- AGENTS.template.md4.0 KB
- detect-tech.md4.8 KB
Gives 0 of the 12 instructions most project setup skills give in ~1.1k tokens
Counted across 999 of the 1,637 authors here whose files we hold, read 2026-08-07
- Ask one question at a timein 29 of 999, across 28 files
- Detect the package manager from lockfilesin 28 of 999, across 9 files
- Present findings to the userin 26 of 999, across 5 files
- Explore current repo statein 24 of 999, across 3 files
- Update the agent skills block in place if it existsin 24 of 999, across 3 files
- Install husky lint-staged and prettierin 23 of 999, across 4 files
- Create the lintstagedrc filein 22 of 999, across 3 files
- Commit all changed filesin 22 of 999, across 3 files
- Run lint-staged to verify it worksin 22 of 999, across 3 files
- Create the husky pre-commit filein 21 of 999, across 2 files
- Create a prettierrc file if missingin 21 of 999, across 2 files
- Initialize huskyin 21 of 999, across 2 files
Said here and by no other author read
- run detect-tech.md from this directory
- map detected manifests to tech names
- write results to the router file
- ensure config wires the router file
- ask user about always-load for single stack
- report missing tech dirs and config status
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.