fix: remove CLAUDE.md symlink generation from build

The CLAUDE.md symlink causes installation errors when using
`npx skills add` as it tries to copy AGENTS.md to itself.

- Remove createClaudeSymlink function from build.ts
- Remove claudeSymlink from SkillPaths interface
- Remove CLAUDE.md references from AGENTS.md structure documentation
- Delete existing CLAUDE.md symlink from skills directory

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Pedro Rodrigues
2026-01-28 15:53:34 +00:00
parent a3b815155c
commit c07c234601
5 changed files with 0 additions and 34 deletions

View File

@@ -11,7 +11,6 @@ skills/
{skill-name}/
SKILL.md # Required: skill manifest (Agent Skills spec)
AGENTS.md # Generated: navigation guide for agents
CLAUDE.md # Generated: symlink to AGENTS.md
references/
_sections.md # Required: section definitions
{prefix}-{name}.md # Reference files

View File

@@ -1,11 +1,8 @@
import {
existsSync,
lstatSync,
readdirSync,
readFileSync,
statSync,
symlinkSync,
unlinkSync,
writeFileSync,
} from "node:fs";
import { basename, join } from "node:path";
@@ -246,25 +243,6 @@ function skillNameToTitle(skillName: string): string {
.join(" ");
}
/**
* Create CLAUDE.md symlink pointing to AGENTS.md
*/
function createClaudeSymlink(paths: SkillPaths): void {
const symlinkPath = paths.claudeSymlink;
// Remove existing symlink or file if it exists
if (existsSync(symlinkPath)) {
const stat = lstatSync(symlinkPath);
if (stat.isSymbolicLink() || stat.isFile()) {
unlinkSync(symlinkPath);
}
}
// Create symlink (relative path so it works across environments)
symlinkSync("AGENTS.md", symlinkPath);
console.log(` Created symlink: CLAUDE.md -> AGENTS.md`);
}
/**
* Build AGENTS.md for a specific skill
*
@@ -293,7 +271,6 @@ function buildSkill(paths: SkillPaths): void {
// Header
output.push(`# ${paths.name}\n`);
output.push(`> **Note:** \`CLAUDE.md\` is a symlink to this file.\n`);
// Brief description
output.push(`## Overview\n`);
@@ -305,7 +282,6 @@ function buildSkill(paths: SkillPaths): void {
output.push(`${paths.name}/`);
output.push(` SKILL.md # Main skill file - read this first`);
output.push(` AGENTS.md # This navigation guide`);
output.push(` CLAUDE.md # Symlink to AGENTS.md`);
if (existsSync(paths.referencesDir)) {
output.push(` references/ # Detailed reference files`);
}
@@ -371,9 +347,6 @@ function buildSkill(paths: SkillPaths): void {
writeFileSync(paths.agentsOutput, output.join("\n"));
console.log(` Generated: ${paths.agentsOutput}`);
console.log(` Total references: ${referenceFiles.length}`);
// Create CLAUDE.md symlink
createClaudeSymlink(paths);
}
// Run build when executed directly

View File

@@ -17,7 +17,6 @@ export interface SkillPaths {
skillDir: string;
referencesDir: string;
agentsOutput: string;
claudeSymlink: string;
skillFile: string;
}
@@ -39,7 +38,6 @@ export function getSkillPaths(skillName: string): SkillPaths {
skillDir,
referencesDir: join(skillDir, "references"),
agentsOutput: join(skillDir, "AGENTS.md"),
claudeSymlink: join(skillDir, "CLAUDE.md"),
skillFile: join(skillDir, "SKILL.md"),
};
}

View File

@@ -1,7 +1,5 @@
# supabase-postgres-best-practices
> **Note:** `CLAUDE.md` is a symlink to this file.
## Overview
Postgres performance optimization and best practices from Supabase. Use this skill when writing, reviewing, or optimizing Postgres queries, schema designs, or database configurations.
@@ -12,7 +10,6 @@ Postgres performance optimization and best practices from Supabase. Use this ski
supabase-postgres-best-practices/
SKILL.md # Main skill file - read this first
AGENTS.md # This navigation guide
CLAUDE.md # Symlink to AGENTS.md
references/ # Detailed reference files
```

View File

@@ -1 +0,0 @@
AGENTS.md