Skip to content
Skills Library
Programming · Building & coding

new-unit

/new-unit

Use when creating or improving a habits unit: the user asks for guidance on a language, tool, framework, platform, testing practice or workflow that has no unit yet, habits suggested creating one, or an existing unit needs work. Covers choosing triggers, what to write, and registering and validating the unit.

Repository
habits ↗
Licence
MIT
Last repository change
13.11.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 13.11.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when creating or improving a habits unit: the user asks for guidance on a language, tool, framework, platform, testing practice or workflow that has no unit yet, habits suggested creating one, or an existing unit needs work. Covers choosing triggers, what to write, and registering and validating the unit.

Original author description

Use when creating or improving a habits unit: the user asks for guidance on a language, tool, framework, platform, testing practice or workflow that has no unit yet, habits suggested creating one, or an existing unit needs work. Covers choosing triggers, what to write, and registering and validating the unit.

How it works

  1. 1. Find where units live
  2. 2. Scope it
  3. 3. Choose the triggers
  4. 4. Write the content
  5. 5. Register and check it
Original SKILL.md headings · 69 lines, 619 words
SKILL.md preview
---
name: new-unit
description: >
  Use when creating or improving a habits unit: the user asks for guidance on a language, tool, framework, platform,
  testing practice or workflow that has no unit yet, habits suggested creating one, or an existing unit needs work.
  Covers choosing triggers, what to write, and registering and validating the unit.
---

# Creating a habits unit

A unit is one small file of professional guidance for one technology, which habits injects only when a project uses that technology. Getting the triggers and the content right is what makes it useful.

## 1. Find where units live

Units are the `units/<category>/<id>.md` files in the habits plugin. The plugin root was given at session start, and `habits` on the PATH runs the CLI.

- Check the root is a git working copy (`git -C <root> rev-parse --show-toplevel`). If it's an installed copy under `~/.claude/plugins/cache/`, an update would overwrite your edit. Tell the user to clone the habits repo and install from that folder (`claude plugin marketplace add <folder>`), then work there.
- Run `habits units` to see what exists. Improve an existing unit rather than adding a near-duplicate.

## 2. Scope it

- One technology per unit, named in one or two lowercase words joined by a hyphen: `swift`, `gradle`, `spring-boot`, `docker-compose`. Never a combination like `kotlin-gradle`; those are two units that load together.
- Categories: `languages`, `tools` (build tools, CLIs, package managers), `frameworks`, `platforms`, `testing`, `workflows` (processes like OpenSpec). Add a category folder only when none fits.
- The file name is the id.

## 3. Choose the triggers

A unit should load in every session that needs it, and in no other. Use as many triggers as fit:

- `paths`: globs of the technology's own files: its source extension (`**/*.swift`) and its config files (`**/Package.swift`, `**/docker-compose.y{a,}ml`). Avoid globs another unit already owns: check `habits units`.
- `commands`: the CLI names someone runs when using it (`docker compose`, `xcodebuild`). Command prefixes match word by word, after stripping `cd …&&`, env assignments and `sudo`.
- `markers`: only for project-level workflows that should load at session start (`openspec/specs`). Relative globs without `{}`; add `*/…` variants for monorepos.
- `lsp`: the language server plugin id, if an official one exists (`<name>-lsp@claude-plugins-official`).
- `script`: only when the guidance must be computed from the project, like the OpenSpec spec index. A Python script next to the unit; it gets `{"cwd", "root"}` as JSON on stdin and prints text.

## 4. Write the content

Write for a strong developer who already knows the language but not the conventions. Every line is read in every session that loads the unit, so each must earn its place.

Include:
- The official style guide or conventions, linked in the first line, and the points from it that are most often gotten wrong.
- Idioms that separate professional code from merely working code.
- Concrete pitfalls, with the correct alternative.
- How to build, test and verify narrowly (exact commands), and what to gitignore.

Leave out:
- General programming advice, and anything already covered by the `hygiene`, `secrets`, `dependencies` or `errors` skills.
- Facts about a single project; those belong in that project's CLAUDE.md or OpenSpec config.
- Tutorials and explanations of basics.

Format: a first line naming the technology and its style guide, then short sections (`Style`, `Idioms`, `Pitfalls`, `Verify`, or whatever fits) of terse imperative bullets. Aim for 20 to 45 lines.

```markdown
---
id: swift
title: Swift
paths: ["**/*.swift"]
lsp: swift-lsp@claude-plugins-official
---
Swift. Follow the Swift API Design Guidelines (swift.org/documentation/api-design-guidelines).

Style
- …
```

## 5. Register and check it

There is no registry to edit: the file's location registers it. Then:

1. `habits validate`: fix every error and warning.
2. `habits units`: confirm the triggers read as intended.
3. `habits status <a project that uses the technology>`: the unit should be listed with matching files, and nothing unrelated should match.
4. `habits load <id>`: read it the way Claude will receive it.

Commit with the commit skill (`feat(units): add <id> unit`). Don't push unless the user asks.

Versions

RepositoryScoreLicence
This page · e-reitbauer/habits100MIT
yoebuild/yoe100Apache-2.0

Database snapshot: 13.11.2026 · package version 6d8cef66f023 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 86units
    Use when the user asks to load, list, show or check habits units, asks which guidance applies to the current project, or names a technology unit to pull in by hand. Examples: "load the maven unit", "what habits apply here?".
  • 100unit-testing
    Writes and updates unit tests for new or changed code in the project's existing framework and style, covering happy, error and boundary paths, then runs them with coverage and fixes failures. Use when implementing a feature or bug fix that needs tests, when asked to add or…
  • 100create-unit-test
    Write or refactor unit tests following the canonical project pattern. Use when adding new unit tests or standardizing existing ones.
  • 90testing-strategy
    Comprehensive testing skill covering unit, integration, and e2e testing with TDD. Use when writing tests, improving coverage, or setting up testing infrastructure. Keywords: test, TDD, unit test, integration, e2e, coverage, mock, jest, vitest
  • 90build-unit
    Implement one unit of a planned build exactly as its spec file says, verify it against the spec's checklist, and update the progress tracker. Use this whenever the user says "build unit 3", "implement the next unit", "implement context/specs/04-...", "build the spec", "fix unit…
  • 100audit-unit
    This skill should be used when the user asks to "audit a unit", "review a unit", "check a unit", "/audit-unit", or wants to verify that a unit follows best practices and has no common issues. Reviews a unit for correctness, completeness, and quality.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.