chore(root): move skills into agents directory

This commit is contained in:
Rahim
2026-07-14 16:00:18 -07:00
parent b66b1ebf23
commit fb2a4af02a
95 changed files with 28 additions and 31 deletions
+9 -9
View File
@@ -537,14 +537,14 @@ function checkAgentContext() {
.filter((line) => line && !line.startsWith('#'))
);
for (const rule of ['/.agents/skills', '/.claude/skills', '/.claude/plans', '/.opencode']) {
for (const rule of ['/.claude/skills', '/.claude/plans', '/.opencode']) {
if (!gitignoreRules.has(rule)) {
warnings.push(`.gitignore: missing generated agent path ${rule}`);
}
}
for (const rule of ['/skills', '/skills/', 'skills', 'skills/']) {
for (const rule of ['/.agents/skills', '/.agents/skills/', '.agents/skills', '.agents/skills/']) {
if (gitignoreRules.has(rule)) {
warnings.push(`.gitignore: canonical top-level skills catalog must not be ignored by ${rule}`);
warnings.push(`.gitignore: canonical .agents/skills catalog must not be ignored by ${rule}`);
}
}
@@ -582,8 +582,8 @@ function checkAgentContext() {
}
const agentsDir = join(ROOT, '.agents');
const skillsDir = join(ROOT, 'skills');
for (const alias of [join(ROOT, '.agents/skills'), join(ROOT, '.claude/skills'), join(ROOT, '.opencode/skills')]) {
const skillsDir = join(agentsDir, 'skills');
for (const alias of [join(ROOT, '.claude/skills'), join(ROOT, '.opencode/skills')]) {
if (!existsSync(alias)) {
warnings.push(`${relativePath(alias)}: missing compatibility alias to skills`);
} else if (realpathSync(alias) !== realpathSync(skillsDir)) {
@@ -603,12 +603,12 @@ function checkAgentContext() {
const skillNames = new Set();
for (const entry of readdirSync(skillsDir, { withFileTypes: true })) {
if (!entry.isDirectory()) {
warnings.push(`skills/${entry.name}: only skill directories are allowed at the catalog root`);
warnings.push(`.agents/skills/${entry.name}: only skill directories are allowed at the catalog root`);
continue;
}
const skillDir = join(skillsDir, entry.name);
if (!existsSync(join(skillDir, 'SKILL.md'))) {
warnings.push(`skills/${entry.name}: missing SKILL.md`);
warnings.push(`.agents/skills/${entry.name}: missing SKILL.md`);
continue;
}
skillNames.add(entry.name);
@@ -618,7 +618,7 @@ function checkAgentContext() {
const canonicalSkillFiles = new Set(canonicalSkillDirs.map((dir) => join(dir, 'SKILL.md')));
for (const path of listFiles(skillsDir, (path) => path.endsWith('/SKILL.md'))) {
if (!canonicalSkillFiles.has(path)) {
warnings.push(`${relativePath(path)}: skills must be direct children of top-level skills/`);
warnings.push(`${relativePath(path)}: skills must be direct children of .agents/skills/`);
}
}
@@ -673,7 +673,7 @@ function checkAgentContext() {
if (metadataBytes > SKILL_METADATA_MAX_BYTES) {
warnings.push(
`skills metadata: ~${estimatedTokens(metadataBytes)} tokens (${metadataBytes} bytes) exceeds ` +
`.agents/skills metadata: ~${estimatedTokens(metadataBytes)} tokens (${metadataBytes} bytes) exceeds ` +
`~${estimatedTokens(SKILL_METADATA_MAX_BYTES)} tokens`
);
}
+2 -4
View File
@@ -2,8 +2,7 @@
* Exposes the checked-in, host-neutral skill catalog through client-specific
* discovery paths:
*
* skills/<skill-name>/SKILL.md (source)
* .agents/skills (generated junction)
* .agents/skills/<skill-name>/SKILL.md (source)
* .claude/skills (generated junction)
* .claude/plans (generated junction)
* .opencode (generated junction)
@@ -16,7 +15,7 @@ import { dirname, join, resolve } from 'node:path';
const root = resolve(import.meta.dirname, '../..');
const agentsDir = join(root, '.agents');
const skillsDir = join(root, 'skills');
const skillsDir = join(agentsDir, 'skills');
function linkState(path) {
try {
@@ -52,7 +51,6 @@ function ensureAlias(relativePath, target) {
mkdirSync(join(agentsDir, 'plans'), { recursive: true });
ensureAlias('.agents/skills', skillsDir);
ensureAlias('.claude/skills', skillsDir);
ensureAlias('.claude/plans', join(agentsDir, 'plans'));
ensureAlias('.opencode', agentsDir);