dirsql 0.4.80 → 0.4.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/howto/agent-skill.md +64 -0
- package/docs/reference/cli.md +3 -0
- package/package.json +6 -6
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Give your coding agent the `dirsql` skill
|
|
2
|
+
|
|
3
|
+
Your coding agent answers questions about many files by reading them one at a
|
|
4
|
+
time. The `dirsql` skill teaches it to write one SQL query instead.
|
|
5
|
+
|
|
6
|
+
## What it does
|
|
7
|
+
|
|
8
|
+
The skill is a short `SKILL.md`. Its description tells the agent when to use
|
|
9
|
+
it: counting, grouping or aggregating files, "which files are ..." by size,
|
|
10
|
+
mtime or extension, pulling one field out of many JSON or frontmatter files,
|
|
11
|
+
or comparing two directories. It tells the agent not to use it to read one
|
|
12
|
+
known file, hunt for a literal string, or list a few names.
|
|
13
|
+
|
|
14
|
+
When the skill triggers, the agent runs `dirsql context`. That prints a guide
|
|
15
|
+
(usage, recipes, troubleshooting) compiled into the `dirsql` binary, so the
|
|
16
|
+
agent always reads the guide for the version it is about to run. See
|
|
17
|
+
[`dirsql context`](../reference/cli.md#dirsql-context).
|
|
18
|
+
|
|
19
|
+
## Install
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npx skills add thekevinscott/dirsql
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This uses [`skills`](https://www.npmjs.com/package/skills), a cross-agent
|
|
26
|
+
skill installer. It installs for the current project by default. Pass `-g` to
|
|
27
|
+
install for your user instead, `-a <agent>` to name
|
|
28
|
+
agents (repeatable), and `-y` to skip the prompts.
|
|
29
|
+
|
|
30
|
+
| Scope | Skill lands in | Claude Code link |
|
|
31
|
+
|---|---|---|
|
|
32
|
+
| Project (default) | `.agents/skills/dirsql` | `.claude/skills/dirsql` |
|
|
33
|
+
| User (`-g`) | `~/.agents/skills/dirsql` | `~/.claude/skills/dirsql` |
|
|
34
|
+
|
|
35
|
+
Codex, Cursor, Gemini CLI, Amp, Cline and other agents that read
|
|
36
|
+
`.agents/skills` use the shared copy directly. Agents with their own skills
|
|
37
|
+
directory, such as Claude Code, get a symlink to it (`--copy` copies instead).
|
|
38
|
+
`npx skills add --help` lists the rest.
|
|
39
|
+
|
|
40
|
+
## Runners
|
|
41
|
+
|
|
42
|
+
The skill works with whichever runner you have. Its `allowed-tools` lets the
|
|
43
|
+
agent run these commands without a permission prompt:
|
|
44
|
+
|
|
45
|
+
| Runner | Command the agent runs |
|
|
46
|
+
|---|---|
|
|
47
|
+
| `uv` | `uvx dirsql ...` |
|
|
48
|
+
| `npm` | `npx -y dirsql ...` |
|
|
49
|
+
| `cargo` | `dirsql ...` after `cargo install dirsql --features cli` |
|
|
50
|
+
|
|
51
|
+
The grant is `Bash(uvx dirsql:*)`, `Bash(npx -y dirsql:*)` and
|
|
52
|
+
`Bash(dirsql:*)`.
|
|
53
|
+
|
|
54
|
+
## Check, update, remove
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
npx skills list # installed skills and their agents (-g for user scope)
|
|
58
|
+
npx skills update # refresh to the latest from GitHub
|
|
59
|
+
npx skills remove dirsql
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
`update` and `remove` accept `-g` for user scope and `-y` to skip prompts.
|
|
63
|
+
The skill itself never needs updating to match the CLI, since the guide comes
|
|
64
|
+
from the installed `dirsql`.
|
package/docs/reference/cli.md
CHANGED
|
@@ -453,6 +453,9 @@ first line is `dirsql <version>`, then sections on usage, recipes and
|
|
|
453
453
|
troubleshooting. The guide is compiled into the binary, so it describes the
|
|
454
454
|
version that prints it. It takes no flags and exits `0`.
|
|
455
455
|
|
|
456
|
+
The dirsql agent skill tells an agent to run this command before it writes a
|
|
457
|
+
query; see [the skill page](../howto/agent-skill.md).
|
|
458
|
+
|
|
456
459
|
## Plugins
|
|
457
460
|
|
|
458
461
|
A **plugin** is an ordinary Python package that ships a `dirsql.toml` config
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dirsql",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.81",
|
|
4
4
|
"description": "Ephemeral SQL index over a local directory",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": "https://github.com/thekevinscott/dirsql",
|
|
@@ -221,10 +221,10 @@
|
|
|
221
221
|
]
|
|
222
222
|
},
|
|
223
223
|
"optionalDependencies": {
|
|
224
|
-
"@dirsql/lib-linux-x64-gnu": "0.4.
|
|
225
|
-
"@dirsql/lib-linux-arm64-gnu": "0.4.
|
|
226
|
-
"@dirsql/lib-darwin-x64": "0.4.
|
|
227
|
-
"@dirsql/lib-darwin-arm64": "0.4.
|
|
228
|
-
"@dirsql/lib-win32-x64-msvc": "0.4.
|
|
224
|
+
"@dirsql/lib-linux-x64-gnu": "0.4.81",
|
|
225
|
+
"@dirsql/lib-linux-arm64-gnu": "0.4.81",
|
|
226
|
+
"@dirsql/lib-darwin-x64": "0.4.81",
|
|
227
|
+
"@dirsql/lib-darwin-arm64": "0.4.81",
|
|
228
|
+
"@dirsql/lib-win32-x64-msvc": "0.4.81"
|
|
229
229
|
}
|
|
230
230
|
}
|