agentleFS
lbb00lbb00/ai-rules-sync/.claude/skills/new-adapter/SKILL.md

new-adapter

Skill37 starsChanged 9 months agoUnlicenseView on GitHub

Add support for a new AI tool with adapters, CLI, completion, and tests.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. About 0 are common, 6 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before starting, gather this information:

    line 14
  2. Very specific:

    Default source directory (e.g., .windsurf/rules/)

    line 17
  3. Distinctive:

    Import the new adapter

    line 44
  4. Very specific:

    Add tool section to ProjectConfig interface

    line 50
  5. Very specific:

    Add tool to SourceDirConfig interface if needed

    line 51
  6. Distinctive:

    Add tool subcommand group

    line 56
  7. Distinctive:

    Add tool to completion types

    line 62
  8. Very specific:

    Update bash/zsh/fish completion scripts

    line 66
  9. Distinctive:

    Test add/remove operations

    line 72
  10. Distinctive:

    Test config path resolution

    line 73

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

New Adapter

Instructions

Complete workflow for adding support for a new AI tool to AIS.

Prerequisites

Before starting, gather this information:

  • Tool name (e.g., "windsurf", "mcp")
  • Rule/config types supported (e.g., rules, commands, skills)
  • Default source directory (e.g., .windsurf/rules/)
  • Target directory (usually same as source)
  • File mode: file or directory

Steps

1. Create Adapter File

Create src/adapters/<tool>-<type>.ts:

import { createBaseAdapter } from './base.js';

export const myToolAdapter = createBaseAdapter({
  name: '<tool>-<type>',
  tool: '<tool>',
  subtype: '<type>',
  configPath: ['<tool>', '<type>'],
  defaultSourceDir: '.<tool>/<type>',
  targetDir: '.<tool>/<type>',
  mode: 'directory', // or 'file'
});

2. Register Adapter

In src/adapters/index.ts:

  • Import the new adapter
  • Register in DefaultAdapterRegistry constructor

3. Update Project Config

In src/project-config.ts:

  • Add tool section to ProjectConfig interface
  • Add tool to SourceDirConfig interface if needed

4. Wire CLI Commands

In src/cli/register.ts:

  • Add tool subcommand group
  • Register add/remove/install/import commands

5. Update Completion

In src/completion.ts:

  • Add tool to completion types
  • Add subtype completions

In src/completion/scripts.ts:

  • Update bash/zsh/fish completion scripts

6. Add Tests

Create src/__tests__/<tool>-<type>.test.ts:

  • Test adapter properties
  • Test add/remove operations
  • Test config path resolution

7. Update Documentation

  • README.md: Add to supported sync types table
  • README_ZH.md: Sync changes (use /sync-readme)
  • CLAUDE.md: Update if architectural changes

8. Verify

# Build
npm run build

# Run tests
npm test

# Test manually
node dist/index.js <tool> <type> add <name>
node dist/index.js <tool> <type> remove <name>

Checklist

  • Adapter file created
  • Adapter registered
  • ProjectConfig updated
  • CLI commands wired
  • Completion updated
  • Tests written and passing
  • README.md updated
  • README_ZH.md synced
  • Manual testing complete

Examples

Request: Add support for a new AI tool with rules and skills Result: Complete adapter implementation with tests passing

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.