refactor(skills): share style skill instructions
This commit is contained in:
@@ -6,29 +6,4 @@ description: Use when creating, editing, or reviewing Nix files in this reposito
|
|||||||
# nix-style
|
# nix-style
|
||||||
|
|
||||||
Use this skill as the source of truth for repository Nix conventions.
|
Use this skill as the source of truth for repository Nix conventions.
|
||||||
|
Follow the shared style skill instructions in `src/skills/style-skill.md`.
|
||||||
## Load rules
|
|
||||||
|
|
||||||
Read every Markdown file directly under [`rules/`](rules/) before applying this skill.
|
|
||||||
Resolve [`rules/`](rules/) relative to this `SKILL.md`.
|
|
||||||
|
|
||||||
Finish when all discovered rule files have been read.
|
|
||||||
|
|
||||||
## Apply rules
|
|
||||||
|
|
||||||
Apply the loaded rules when editing or reviewing Nix files.
|
|
||||||
When loaded rules conflict, follow the most specific rule.
|
|
||||||
|
|
||||||
After editing Nix files, run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nix run .#fix
|
|
||||||
```
|
|
||||||
|
|
||||||
Finish when `nix run .#fix` succeeds and the Nix change follows the loaded rules.
|
|
||||||
If the command fails, report the failure.
|
|
||||||
|
|
||||||
## Maintain rules
|
|
||||||
|
|
||||||
When adding or changing files under [`rules/`](rules/), read the shared rule format at `src/skills/RULE-FORMAT.md` first.
|
|
||||||
Finish when the changed rule files follow that format.
|
|
||||||
|
|||||||
@@ -6,29 +6,4 @@ description: Use when creating, editing, or reviewing Rust files in this reposit
|
|||||||
# rust-style
|
# rust-style
|
||||||
|
|
||||||
Use this skill as the source of truth for repository Rust conventions.
|
Use this skill as the source of truth for repository Rust conventions.
|
||||||
|
Follow the shared style skill instructions in `src/skills/style-skill.md`.
|
||||||
## Load rules
|
|
||||||
|
|
||||||
Read every Markdown file directly under [`rules/`](rules/) before applying this skill.
|
|
||||||
Resolve [`rules/`](rules/) relative to this `SKILL.md`.
|
|
||||||
|
|
||||||
Finish when all discovered rule files have been read.
|
|
||||||
|
|
||||||
## Apply rules
|
|
||||||
|
|
||||||
Apply the loaded rules when editing or reviewing Rust files.
|
|
||||||
When loaded rules conflict, follow the most specific rule.
|
|
||||||
|
|
||||||
After editing Rust files, run:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
nix run .#fix
|
|
||||||
```
|
|
||||||
|
|
||||||
Finish when `nix run .#fix` succeeds and the Rust change follows the loaded rules.
|
|
||||||
If the command fails, report the failure.
|
|
||||||
|
|
||||||
## Maintain rules
|
|
||||||
|
|
||||||
When adding or changing files under [`rules/`](rules/), read the shared rule format at `src/skills/RULE-FORMAT.md` first.
|
|
||||||
Finish when the changed rule files follow that format.
|
|
||||||
|
|||||||
29
src/skills/style-skill.md
Normal file
29
src/skills/style-skill.md
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
# Style skill instructions
|
||||||
|
|
||||||
|
Use this document for skills that own repository style conventions.
|
||||||
|
|
||||||
|
## Load rules
|
||||||
|
|
||||||
|
Read every Markdown file directly under `rules/` before applying the skill.
|
||||||
|
Resolve `rules/` relative to the skill's `SKILL.md`.
|
||||||
|
|
||||||
|
Finish when all discovered rule files have been read.
|
||||||
|
|
||||||
|
## Apply rules
|
||||||
|
|
||||||
|
Apply the loaded rules when editing or reviewing files covered by the skill.
|
||||||
|
When loaded rules conflict, follow the most specific rule.
|
||||||
|
|
||||||
|
After editing files covered by the skill, run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
nix run .#fix
|
||||||
|
```
|
||||||
|
|
||||||
|
Finish when `nix run .#fix` succeeds and the change follows the loaded rules.
|
||||||
|
If the command fails, report the failure.
|
||||||
|
|
||||||
|
## Maintain rules
|
||||||
|
|
||||||
|
When adding or changing files under `rules/`, read the shared rule format at `src/skills/RULE-FORMAT.md` first.
|
||||||
|
Finish when the changed rule files follow that format.
|
||||||
Reference in New Issue
Block a user