agentleFS
mtctmtct/skill-editor/CLAUDE.md

skill-editor

CLAUDE.md4 starsChanged 9 months agoMITView on GitHub

Skill Editor is a client-only React SPA for editing .skill files (ZIP archives). Users load a .skill file, edit its contents (SKILL.md, scripts, references, assets), and export the modified archive. There is no backend — all processing is browser-side. No test runner is configured. All application state lives in useSkillState (src/hooks/useSkillState.js), a useReducer-based hook. Key shape: Actions: LOAD_SKILL, LOAD_ERROR, SELECT_FILE, UPDATE_FILE, ADD_FILE, DELETE_FILE, SET_VALIDATION_ERRORS, CLEAR_ERRORS, SET_SAVING, RESET. Load .skill → zipHandler.js extracts ZIP → state populated via LOAD_SKILL → tree…

The file

We split this CLAUDE.md into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No test runner is configured.

    line 17
  2. Very specific:

    No TypeScript: All source files must be .jsx or .js.

    line 21
  3. Distinctive:

    No backend calls: All processing happens in the browser.

    line 22
  4. Very specific:

    All application state lives in useSkillState (src/hooks/useSkillState.js), a useReducer-based hook.

    line 40
  5. Very specific:

    Add: only to scripts/, references/, or assets/.

    line 74

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md 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
CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project

Skill Editor is a client-only React SPA for editing .skill files (ZIP archives). Users load a .skill file, edit its contents (SKILL.md, scripts, references, assets), and export the modified archive. There is no backend — all processing is browser-side.

Commands

npm run dev      # Start dev server (http://localhost:5173)
npm run build    # Production build → dist/
npm run preview  # Preview production build

No test runner is configured.

Coding Rules

  • No TypeScript. All source files must be .jsx or .js.
  • No backend calls. All processing happens in the browser.
  • No persistence. State lives only in memory for the current session (except theme preference in localStorage).
  • UI copy is in Italian — all user-facing strings live in src/constants/messages.js.
  • Scripts from .skill files are displayed and edited only — never executed.

Architecture

Two-screen flow

  1. UploadScreen — drag & drop or file picker to load a .skill file.
  2. SkillEditor — main editing interface composed of:
    • Header — filename, SALVA/CHIUDI buttons, theme toggle, sidebar toggle.
    • Sidebar — tree view (react-arborist) with delete buttons; SKILL.md is protected.
    • EditorPanel — CodeMirror 6 with per-extension syntax highlighting; images and PDFs render as previews instead of editor.
    • ValidationToast — shown on pre-export validation failure.

State management

All application state lives in useSkillState (src/hooks/useSkillState.js), a useReducer-based hook. Key shape:

{
  appState: 'upload' | 'editing',
  fileName: string | null,
  files: { [path]: { content: string | base64, isBinary: boolean } },
  selectedFile: string | null,
  isModified: boolean,
  validationErrors: string[],
}

Actions: LOAD_SKILL, LOAD_ERROR, SELECT_FILE, UPDATE_FILE, ADD_FILE, DELETE_FILE, SET_VALIDATION_ERRORS, CLEAR_ERRORS, SET_SAVING, RESET.

Data flow

Load .skill → zipHandler.js extracts ZIP → state populated via LOAD_SKILL → tree rendered → user edits update state via UPDATE_FILE → save triggers SKILL.md validation → ZIP regenerated and downloaded.

.skill File Format

A .skill file is a ZIP archive:

SKILL.md          ← required; YAML frontmatter + Markdown body
scripts/          ← optional
references/       ← optional
assets/           ← optional

SKILL.md frontmatter parsed with regex /^---\n([\s\S]*?)\n---\n([\s\S]*)$/ and validated with js-yaml (safe parse). Must contain non-empty name and description fields.

File Management Rules

  • Add: only to scripts/, references/, or assets/.
  • Delete: any file except SKILL.md.
  • Binary files (images, PDFs) stored as base64 in memory.

Key Utilities

FileResponsibility
src/utils/zipHandler.jsLoad (JSZip.loadAsync) and export (generateAsync) ZIP; auto-strips common root folder
src/utils/yamlParser.jsParse and validate SKILL.md frontmatter
src/utils/fileUtils.jsExtension detection, binary file detection, CodeMirror language mapping

CodeMirror 6 Language Map

ExtensionLanguage
.md / .markdownMarkdown
.yaml / .ymlYAML
.pyPython
.js / .sh / .jsonJavaScript

Deployment

GitHub Actions (.github/workflows/deploy.yml) builds and deploys to GitHub Pages on every push to main. The Vite base path is /skill-editor/. Manual chunks split React, CodeMirror, and vendor bundles for performance.

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.