agent-loadout 1.0.0 → 1.0.2

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.
Files changed (3) hide show
  1. package/README.md +21 -3
  2. package/dist/index.js +43 -4
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -132,6 +132,12 @@ npx agent-loadout list --json
132
132
 
133
133
  # Print a generated Brewfile (macOS only)
134
134
  npx agent-loadout list --brewfile
135
+
136
+ # Write missing skill files for installed tools
137
+ npx agent-loadout skills
138
+
139
+ # Rewrite all skill files (e.g. after upgrading agent-loadout)
140
+ npx agent-loadout skills --force
135
141
  ```
136
142
 
137
143
  ## Brewfile alternative (macOS)
@@ -144,12 +150,24 @@ brew bundle
144
150
 
145
151
  ## Skills
146
152
 
147
- When you install tools, `agent-loadout` writes skill files to multiple locations:
153
+ When you install tools, `agent-loadout` writes skill files to:
148
154
 
149
- - `~/.claude/skills/` — for Claude Code
155
+ - `~/.claude/skills/agent-loadout/` — auto-discovered by Claude Code
150
156
  - `~/.agent-loadout/skills/` — generic copy for other agents
151
157
 
152
- Each skill is a focused playbook what the tool does, trusted commands, gotchas — so your AI agent knows how to use it effectively.
158
+ Each skill is a focused playbook: what the tool does, trusted commands, output formats, and gotchas. A `SKILL.md` index is also written, with every installed tool and its primary use case packed into the frontmatter — so your agent sees the full inventory in its system prompt on every session without loading individual files.
159
+
160
+ ### Syncing skills
161
+
162
+ Skills are written automatically after `install`. To write or refresh them independently:
163
+
164
+ ```sh
165
+ # Write skills for any installed tools that don't have one yet
166
+ npx agent-loadout skills
167
+
168
+ # Rewrite skill files for all installed tools
169
+ npx agent-loadout skills --force
170
+ ```
153
171
 
154
172
  ## Requirements
155
173
 
package/dist/index.js CHANGED
@@ -83,7 +83,7 @@ import { mkdir } from "fs/promises";
83
83
  var BASE_DIR = join(homedir(), ".agent-loadout");
84
84
  var GENERIC_SKILLS = join(BASE_DIR, "skills");
85
85
  var SKILL_TARGETS = {
86
- claude: join(homedir(), ".claude", "skills")
86
+ claude: join(homedir(), ".claude", "skills", "agent-loadout")
87
87
  };
88
88
  var paths = {
89
89
  base: BASE_DIR,
@@ -1636,7 +1636,6 @@ Agents verifying domain setups, debugging DNS issues, or checking propagation ge
1636
1636
  `.trim();
1637
1637
 
1638
1638
  // src/skills.ts
1639
- var PREFIX = "agent-loadout";
1640
1639
  var SKILL_CONTENT = {
1641
1640
  rg: rg_default,
1642
1641
  fd: fd_default,
@@ -1690,7 +1689,7 @@ var SKILL_CONTENT = {
1690
1689
  doggo: doggo_default
1691
1690
  };
1692
1691
  function skillFilename(toolId) {
1693
- return `${PREFIX}-${toolId}.md`;
1692
+ return `${toolId}.md`;
1694
1693
  }
1695
1694
  function buildFrontmatter(tool) {
1696
1695
  const lines = [
@@ -1723,6 +1722,42 @@ async function findToolsMissingSkills(toolIds, dir = paths.skillTargets.claude)
1723
1722
  );
1724
1723
  return results.filter((id) => id !== null);
1725
1724
  }
1725
+ function buildTOC(tools) {
1726
+ const byPreset = /* @__PURE__ */ new Map();
1727
+ for (const tool of tools) {
1728
+ const group = byPreset.get(tool.preset) ?? [];
1729
+ group.push(tool);
1730
+ byPreset.set(tool.preset, group);
1731
+ }
1732
+ const compactDescription = PRESETS.filter((p) => byPreset.has(p.id)).map((preset) => {
1733
+ const entries = (byPreset.get(preset.id) ?? []).map((t) => {
1734
+ const use = (t.tags?.[0] ?? t.description).replace(/ /g, "-");
1735
+ return `${t.id}(${use})`;
1736
+ }).join(" ");
1737
+ return `${preset.name}: ${entries}`;
1738
+ }).join(" | ");
1739
+ const sections = PRESETS.filter((p) => byPreset.has(p.id)).map((preset) => {
1740
+ const entries = (byPreset.get(preset.id) ?? []).map((t) => {
1741
+ const uses = (t.tags ?? []).slice(0, 4).join(" \xB7 ");
1742
+ return `- **[${t.name}](./${skillFilename(t.id)})** \u2014 ${uses}`;
1743
+ }).join("\n");
1744
+ return `## ${preset.name}
1745
+ ${entries}`;
1746
+ }).join("\n\n");
1747
+ return [
1748
+ "---",
1749
+ `description: "${compactDescription}"`,
1750
+ "source: agent-loadout",
1751
+ "---",
1752
+ "",
1753
+ "# Agent Loadout",
1754
+ "",
1755
+ "Each file has trusted commands, output formats, and agent-specific tips.",
1756
+ "",
1757
+ sections,
1758
+ ""
1759
+ ].join("\n");
1760
+ }
1726
1761
  async function writeSkills(tools) {
1727
1762
  await ensureSkillDirs();
1728
1763
  const allDirs = [...Object.values(paths.skillTargets), paths.genericSkills];
@@ -1737,12 +1772,16 @@ async function writeSkills(tools) {
1737
1772
  }
1738
1773
  written++;
1739
1774
  }
1775
+ const toc = buildTOC(tools.filter((t) => SKILL_CONTENT[t.id]));
1776
+ for (const dir of allDirs) {
1777
+ await writeFile3(join2(dir, "SKILL.md"), toc);
1778
+ }
1740
1779
  return written;
1741
1780
  }
1742
1781
 
1743
1782
  // src/index.ts
1744
1783
  var program = new Command();
1745
- program.name("agent-loadout").description("One command to load out your terminal for agentic coding").version("1.0.0");
1784
+ program.name("agent-loadout").description("One command to load out your terminal for agentic coding").version("1.0.2");
1746
1785
  process.on("SIGINT", () => {
1747
1786
  console.log(chalk10.dim("\n Cancelled."));
1748
1787
  process.exit(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-loadout",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "One command to load out your terminal for agentic coding",
5
5
  "type": "module",
6
6
  "bin": {