/contree:setup-linterfrom contree
Sets up conventional linting with strong rules, autofix commands, CI enforcement, and save-time hooks for JavaScript/TypeScript, Elixir, and Go projects using ESLint, Credo, golangci-lint.
Ships in contree. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Install a strong conventional linter, repair the existing project, and make the same repair run after every coding-agent save.
Inspect the ecosystem, manifests, CI, source layout, existing lint configuration, and project hook configuration. Preserve the project's established package manager and native command conventions.
Choose the ecosystem's strong conventional rules and agree the strong conventional rules with the operator before changing files. Present the evidence, exact rules, files, commands, and hook changes. Resolve consequential conflicts such as an existing CI reporter or project-owned rule whose meaning would change.
Use these defaults:
| Ecosystem | Linter | Strong rules and command |
|---|---|---|
| JavaScript | ESLint | @eslint/js recommended; eslint . |
| TypeScript | ESLint | @eslint/js recommended plus typescript-eslint strictTypeChecked, parserOptions.projectService: true, and the TypeScript compiler |
| Elixir | Credo | mix credo --strict |
| Go | golangci-lint | standard plus errorlint, exhaustive, gosec, nilerr, nilnil, and wrapcheck; golangci-lint run |
Read the current official documentation for the selected tool before using its API or configuration format.
Install the conventional linter with the project's package manager. Merge into existing configuration. Never replace project-owned rules, plugins, ignores, formatters, reporters, commands, CI steps, or hooks.
For JavaScript, install eslint and @eslint/js, then merge js.configs.recommended into eslint.config.mjs. For TypeScript, also install typescript-eslint, merge tseslint.configs.strictTypeChecked, set parserOptions.projectService: true, and include compiler checking in lint:code. For Elixir, add Credo to the development and test dependencies and generate .credo.exs. For Go, write or merge .golangci.yml with the listed linters enabled.
Create native project commands. In a JavaScript or TypeScript project these are:
{
"scripts": {
"lint:code": "eslint .",
"lint:code:fix": "eslint . --fix"
}
}
Use the equivalent native project command for other ecosystems. Add the non-fixing command as a required CI gate using the existing CI system and merge it without replacing other gates.
Create executable .contree/hooks/lint-on-save.sh. Select the exact autofix command for the detected ecosystem rather than placing alternatives in the generated script.
JavaScript and TypeScript:
#!/usr/bin/env bash
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
if output=$(pnpm lint:code:fix 2>&1); then
exit 0
fi
printf '%s\n' "$output" >&2
exit 2
Use the project's package manager in place of pnpm. Elixir runs mix format followed by mix credo --strict. Go runs golangci-lint run --fix.
Merge this synchronous PostToolUse group into both .claude/settings.json and .codex/hooks.json without replacing existing settings or hook entries:
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "bash \"$(git rev-parse --show-toplevel)/.contree/hooks/lint-on-save.sh\"",
"statusMessage": "Fixing lint"
}
]
}
]
}
}
Keep the hook synchronous so automatic changes and failures reach the coding agent before it continues. If save-time autofix cannot complete, preserve the complete linter output, write it to stderr, and exit 2.
Run autofix across the whole existing project. Then run the non-fixing lint command across the whole project.
Fix remaining violations directly. Do not merely list them or transfer the repair work to the operator. Preserve intended behavior and project-owned rules. Rerun lint after every repair batch until it passes.
Verify the CI gate and verify both coding-harness hooks through an actual Claude Code edit and an actual Codex edit. Do not report completion until lint passes and both save-time feedback paths have been exercised successfully.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
15 skills in this plugin
/bootstrap-test-treesCompose mental-model and test-tree setup, then implement every existing-project tree through a second subagent wave. TRIGGER when: the operator asks to bootstrap, backfill, discover, or implement a project's existing behaviour as test trees and tests./changeSet expected behaviour by writing or modifying test trees before code changes. TRIGGER when: the user describes a feature, capability, behaviour change, removal, or modification they want — even loosely (e.g. 'I want X', 'let's add Y', 'can we make it do Z', 'change how X works', 'remove this behaviour')./change-without-meRun the complete Contree arc from idea to independently reviewed working software without routine operator phase transitions: change sets the contract, sync audits it, tdd closes every gap, mutation and completion sync prove the result, and second-opinion findings are repaired before completion. TRIGGER when: the user wants the full workflow, asks to take an idea through implementation, asks to make the project complete, or wants change/sync/tdd handled end to end./diff-for-humansGenerate a single image that explains the current change to a human, using OpenAI's gpt-image-2 model — foregrounding the technical substance the change touches (contracts, databases, behaviour, test trees). TRIGGER when: the user runs /diff-for-humans, or asks to see, picture, illustrate, or visualise the current change or diff./fix-architectureRepair every reported architecture violation with partitioned subagent work and rerun boundary feedback until green. TRIGGER when: architecture lint reports violations or an operator asks to fix dependency direction, purity, composition-root, or cycle problems./second-opinionGet an independent review of completed work from OpenAI's gpt-5.6-sol with high reasoning effort — sends the work and test-tree contract through the Responses API with OPENAI_API_KEY and surfaces its critique. TRIGGER when: sync has just finished, the user asks for a second opinion, an independent review, or a sanity check on completed work before a PR or release.npx claudepluginhub elimydlarz/claude-code-plugins --plugin contree