agent-loadout 1.0.0 → 1.0.1
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/dist/index.js +36 -4
- package/package.json +1 -1
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 `${
|
|
1692
|
+
return `${toolId}.md`;
|
|
1694
1693
|
}
|
|
1695
1694
|
function buildFrontmatter(tool) {
|
|
1696
1695
|
const lines = [
|
|
@@ -1723,6 +1722,35 @@ 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 allTags = tools.flatMap((t) => t.tags?.slice(0, 2) ?? []);
|
|
1733
|
+
const tagSummary = [...new Set(allTags)].slice(0, 8).join(", ");
|
|
1734
|
+
const sections = PRESETS.filter((p) => byPreset.has(p.id)).map((preset) => {
|
|
1735
|
+
const entries = (byPreset.get(preset.id) ?? []).map((t) => {
|
|
1736
|
+
const uses = (t.tags ?? []).slice(0, 4).join(" \xB7 ");
|
|
1737
|
+
return `- **[${t.name}](./${skillFilename(t.id)})** \u2014 ${uses}`;
|
|
1738
|
+
}).join("\n");
|
|
1739
|
+
return `## ${preset.name}
|
|
1740
|
+
${entries}`;
|
|
1741
|
+
}).join("\n\n");
|
|
1742
|
+
return [
|
|
1743
|
+
"---",
|
|
1744
|
+
`description: "Installed CLI tools \u2014 ${tagSummary} and more. Read individual files for commands and agent tips."`,
|
|
1745
|
+
"source: agent-loadout",
|
|
1746
|
+
"---",
|
|
1747
|
+
"",
|
|
1748
|
+
"# Agent Loadout",
|
|
1749
|
+
"",
|
|
1750
|
+
sections,
|
|
1751
|
+
""
|
|
1752
|
+
].join("\n");
|
|
1753
|
+
}
|
|
1726
1754
|
async function writeSkills(tools) {
|
|
1727
1755
|
await ensureSkillDirs();
|
|
1728
1756
|
const allDirs = [...Object.values(paths.skillTargets), paths.genericSkills];
|
|
@@ -1737,12 +1765,16 @@ async function writeSkills(tools) {
|
|
|
1737
1765
|
}
|
|
1738
1766
|
written++;
|
|
1739
1767
|
}
|
|
1768
|
+
const toc = buildTOC(tools.filter((t) => SKILL_CONTENT[t.id]));
|
|
1769
|
+
for (const dir of allDirs) {
|
|
1770
|
+
await writeFile3(join2(dir, "SKILL.md"), toc);
|
|
1771
|
+
}
|
|
1740
1772
|
return written;
|
|
1741
1773
|
}
|
|
1742
1774
|
|
|
1743
1775
|
// src/index.ts
|
|
1744
1776
|
var program = new Command();
|
|
1745
|
-
program.name("agent-loadout").description("One command to load out your terminal for agentic coding").version("1.0.
|
|
1777
|
+
program.name("agent-loadout").description("One command to load out your terminal for agentic coding").version("1.0.1");
|
|
1746
1778
|
process.on("SIGINT", () => {
|
|
1747
1779
|
console.log(chalk10.dim("\n Cancelled."));
|
|
1748
1780
|
process.exit(0);
|