Skip to content

Commit 396d005

Browse files
committed
Break long lines in towards-self-improvement.mdx
1 parent 7187191 commit 396d005

1 file changed

Lines changed: 74 additions & 22 deletions

File tree

src/content/docs/getting-started/towards-self-improvement.mdx

Lines changed: 74 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,61 @@
11
---
22
title: Towards self-improvement
3-
description: Improve agent output over time by codifying project rules in AGENTS.md and adopting reusable skills for recurring tasks.
3+
description: >-
4+
Improve agent output over time by codifying project rules in
5+
AGENTS.md and adopting reusable skills for recurring tasks.
46
---
57

8+
69
import ExternalLink from "../../../components/ExternalLink.astro";
710
import { Steps } from "@astrojs/starlight/components";
811

912
## AGENTS.md
1013

11-
An essential aspect of becoming productive while working with agents is to _blend them with code_. Your agents need to adapt to the codebase, and your codebase needs to adapt to the agents. For example, you might not necessarily like the commit message that the agent has just produced.
14+
An essential aspect of becoming productive while working with agents is to
15+
_blend them with code_.
16+
Your agents need to adapt to the codebase, and your codebase needs to adapt to
17+
the agents.
18+
For example, you might not necessarily like the commit message that the agent
19+
has just produced.
1220

13-
One way to steer agents toward doing the right things is to have an `AGENTS.md` file in the repository root. This file is read by the agent in each thread.
21+
One way to steer agents toward doing the right things is to have an `AGENTS.md`
22+
file in the repository root.
23+
This file is read by the agent in each thread.
1424

1525
:::note
16-
This file is standardized and supported by most agent harnesses (except Claude Code). There are also harness-specific mechanisms, like `CLAUDE.md` or <ExternalLink href="https://cursor.com/docs/context/rules">Cursor Rules</ExternalLink>.
26+
This file is standardized and supported by most agent harnesses (except Claude Code).
27+
There are also harness-specific mechanisms, like `CLAUDE.md`
28+
or <ExternalLink href="https://cursor.com/docs/context/rules">Cursor Rules</ExternalLink>.
1729
:::
1830

1931
:::tip
20-
Don’t use the `/init` command of your harness of choice (which is meant to set up such rules files). It tends to produce documents that bring little meaningful value.
32+
Don’t use the `/init` command of your harness of choice (which is meant to set
33+
up such rules files).
34+
It tends to produce documents that bring little meaningful value.
2135
:::
2236

2337
<Steps>
2438

25-
1. Write a minimal `AGENTS.md` file. The goal is just to steer the agent to do the right thing every time. Here is <ExternalLink href="https://github.com/mkaput">Marek Kaput</ExternalLink>’s example template:
39+
1. Write a minimal `AGENTS.md` file.
40+
The goal is just to steer the agent to do the right thing every time.
41+
Here is <ExternalLink href="https://github.com/mkaput">Marek Kaput</ExternalLink>’s
42+
example template:
2643

2744
:::tip[Claude Code]
28-
In Claude Code, instead of telling the agent to run linters/typecheckers via AGENTS.md rules, set them up as <ExternalLink href="https://code.claude.com/docs/en/hooks">hooks</ExternalLink>. Hooks run automatically after each file edit, so the agent gets instant feedback without burning context on lint/typecheck output from explicit tool calls.
45+
In Claude Code, instead of telling the agent to run linters/typecheckers via
46+
AGENTS.md rules, set them up as <ExternalLink href="https://code.claude.com/docs/en/hooks">hooks</ExternalLink>.
47+
Hooks run automatically after each file edit, so the agent gets instant
48+
feedback without burning context on lint/typecheck output from explicit tool
49+
calls.
2950
:::
3051

3152
```md
3253
# [Project name]
3354

3455
## Rules
3556

36-
- you may be running in parallel with other agents; cooperate to avoid conflicts, but avoid committing changes made by others
57+
- you may be running in parallel with other agents; cooperate to avoid conflicts,
58+
but avoid committing changes made by others
3759
- add test coverage for new logic and regression fixes where practical
3860
- run `npm lint` to format code and run linters; run `npm test` to run tests
3961
- ignore any backward compatibility - break stuff everywhere if needed
@@ -46,19 +68,28 @@ Don’t use the `/init` command of your harness of choice (which is meant to set
4668

4769
## Dev environment tips
4870

49-
- Use `pnpm dlx turbo run where «project_name»` to jump to a package instead of scanning with `ls`.
50-
- Run `pnpm install --filter «project_name»` to add the package to your workspace so Vite, ESLint, and TypeScript can see it.
51-
- Use `pnpm create vite@latest «project_name» -- --template react-ts` to spin up a new React + Vite package with TypeScript checks ready.
52-
- Check the name field inside each package's package.json to confirm the right name - skip the top-level one.
71+
- Use `pnpm dlx turbo run where «project_name»` to jump to a package instead
72+
of scanning with `ls`.
73+
- Run `pnpm install --filter «project_name»` to add the package to your workspace
74+
so Vite, ESLint, and TypeScript can see it.
75+
- Use `pnpm create vite@latest «project_name» -- --template react-ts` to spin
76+
up a new React + Vite package with TypeScript checks ready.
77+
- Check the name field inside each package's package.json to confirm the
78+
right name - skip the top-level one.
5379

5480
## Testing instructions
5581

5682
- Find the CI plan in the .github/workflows folder.
57-
- Run `pnpm turbo run test --filter «project_name»` to run every check defined for that package.
58-
- From the package root you can just call `pnpm test`. The commit should pass all tests before you merge.
59-
- To focus on one step, add the Vitest pattern: `pnpm vitest run -t "«test name»"`.
83+
- Run `pnpm turbo run test --filter «project_name»` to run every check
84+
defined for that package.
85+
- From the package root you can just call `pnpm test`. The commit should pass
86+
all tests before you merge.
87+
- To focus on one step, add the Vitest pattern:
88+
`pnpm vitest run -t "«test name»"`.
6089
- Fix any test or type errors until the whole suite is green.
61-
- After moving files or changing imports, run `pnpm lint --filter «project_name»` to be sure ESLint and TypeScript rules still pass.
90+
- After moving files or changing imports, run
91+
`pnpm lint --filter «project_name»` to be sure ESLint and TypeScript rules
92+
still pass.
6293
- Add or update tests for the code you change, even if nobody asked.
6394

6495
## PR instructions
@@ -67,7 +98,8 @@ Don’t use the `/init` command of your harness of choice (which is meant to set
6798
- Always run `pnpm lint` and `pnpm test` before committing.
6899
```
69100

70-
It is rather important to keep this file relatively short but dense in crucial hints. If a piece of information is one `ls` or `cat` call away, it can be skipped.
101+
It is rather important to keep this file relatively short but dense in crucial hints.
102+
If a piece of information is one `ls` or `cat` call away, it can be skipped.
71103

72104
Below, you can see an example of what **NOT** to include.
73105

@@ -116,21 +148,41 @@ Don’t use the `/init` command of your harness of choice (which is meant to set
116148
</Steps>
117149

118150
:::tip
119-
As your codebase and AGENTS.md grow, it will make sense to move chunks of that file into either skills or separate files in the `docs/` directory, while AGENTS.md becomes mostly a table of contents.
151+
As your codebase and AGENTS.md grow, it will make sense to move chunks of that
152+
file into either skills or separate files in the `docs/` directory, while
153+
AGENTS.md becomes mostly a table of contents.
120154
:::
121155

122156
## Skills
123157

124-
Agent Skills is an open standard for extending AI agents with specialized capabilities. Skills package domain-specific knowledge and workflows that agents can use to perform specific tasks.
158+
Agent Skills is an open standard for extending AI agents with specialized
159+
capabilities.
160+
Skills package domain-specific knowledge and workflows that agents can use to
161+
perform specific tasks.
162+
163+
We can’t tell you upfront what skills you might need without knowing what
164+
you’re working on (because skills are domain-specific).
165+
Fortunately, you don’t need to worry about where to put skill files or how each
166+
harness expects them to be structured.
125167

126-
We can’t tell you upfront what skills you might need without knowing what you’re working on (because skills are domain-specific). Fortunately, you don’t need to worry about where to put skill files or how each harness expects them to be structured. The interactive CLI `npx skills` handles all of that — it pulls skills from the <ExternalLink href="https://skills.sh/">skills.sh</ExternalLink> directory and installs them in the right format for 40+ agent harnesses, including Claude Code, Cursor, Amp, Codex, Gemini CLI, GitHub Copilot, and many more.
168+
The interactive CLI `npx skills` handles all of that - it pulls skills from
169+
the <ExternalLink href="https://skills.sh/">skills.sh</ExternalLink>
170+
directory and installs them in the right format for 40+ agent harnesses,
171+
including Claude Code, Cursor, Amp, Codex, Gemini CLI, GitHub Copilot, and many more.
127172

128173
![npx skills CLI](../../../assets/skills-cli.png)
129174

130175
:::caution
131-
Before you try a new skill, always read its entire source and think about its security considerations. Skills are a powerful mechanism partly because they can be insecure. The surrounding ecosystem is still very young, and many skill-based attacks are happening in the wild.
176+
Before you try a new skill, always read its entire source and think about its
177+
security considerations.
178+
Skills are a powerful mechanism partly because they can be insecure.
179+
The surrounding ecosystem is still very young, and many skill-based attacks are
180+
happening in the wild.
132181
:::
133182

134183
:::tip
135-
Skills are meant to be amended by you or your agent to tailor to your project, machine, and taste. Don’t be afraid to fork a skill. If the “upstream” skill is updated, tell your agent to update your fork.
184+
Skills are meant to be amended by you or your agent to tailor to your project,
185+
machine, and taste.
186+
Don’t be afraid to fork a skill.
187+
If the “upstream” skill is updated, tell your agent to update your fork.
136188
:::

0 commit comments

Comments
 (0)