agentleFS
AvinashPAvinashP/AgentsAtlas/skills/scaffolding/SKILL.md

scaffolding

Skill7 starsChanged 9 months agoMITView on GitHub

Generates boilerplate following project conventions. Use when asked to create a new component, module, service, or scaffold code.

5 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

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

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Import style (relative vs aliases)

    line 31
  2. Distinctive:

    Test co-location (same folder or separate)

    line 32
  3. Distinctive:

    Ask for scaffolding like:

    line 71
  4. Distinctive:

    Use the same folder structure

    line 117
  5. Distinctive:

    Add "improvements" to the template

    line 122
  6. Distinctive:

    Use different naming conventions

    line 124

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “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

Scaffolding Skill

Generate boilerplate code that matches existing project conventions.

Workflow

1. Detect Project Conventions

Before generating, find existing patterns:

# Find similar files
find . -name "*.tsx" -path "*/components/*" | head -5

# Check file structure
ls -la src/components/

# Look at existing code
cat src/components/Button/Button.tsx

Key conventions to detect:

  • File/folder structure (flat vs nested)
  • Naming conventions (PascalCase, camelCase, kebab-case)
  • Export style (default vs named)
  • Import style (relative vs aliases)
  • Test co-location (same folder or separate)
  • Styling approach (CSS Modules, styled-components, Tailwind)

2. Match Project Style

Always match:

AspectCheck for
File namingButton.tsx, button.tsx, Button.component.tsx
Folder structureButton/index.tsx or Button.tsx
Component stylefunction vs arrow, FC type vs implicit
Props definitioninterface vs type, inline vs separate
Exportsexport default vs export const
Test files.test.tsx, .spec.tsx, __tests__/

3. Generate Code

Include what's standard in the project:

  • Main file (component/module)
  • Types/interfaces (if TypeScript)
  • Test file (if tests exist nearby)
  • Index file (if using barrel exports)
  • Styles (if using CSS Modules)
  • Stories (if using Storybook)

4. Verify Output

Check generated code:

  • Follows detected conventions
  • Imports resolve correctly
  • TypeScript compiles (if applicable)
  • Matches similar files in project

Quick Reference

Scaffolding Commands

Ask for scaffolding like:

  • "Create a new UserProfile component"
  • "Scaffold a PaymentService"
  • "Generate a useAuth hook"
  • "Create a products API route"

What to Generate

TypeUsually Includes
React ComponentComponent file, types, test, styles, index
API RouteHandler, types, validation, test
ServiceClass/module, types, test
HookHook file, types, test
UtilityFunction file, types, test

File Detection Patterns

# Detect React style
grep -l "React.FC\|: FC<" src/**/*.tsx  # Typed FC
grep -l "function.*Props" src/**/*.tsx  # Function with props

# Detect test pattern
ls src/**/*.test.* 2>/dev/null  # Co-located
ls tests/ 2>/dev/null            # Separate folder

# Detect styling
ls src/**/*.module.css 2>/dev/null  # CSS Modules
grep "styled\." src/**/*.tsx         # styled-components
grep "className=" src/**/*.tsx       # Tailwind/CSS

Templates

Templates are available for common stacks:

  • react.md - React component templates
  • node.md - Node.js/Express templates
  • python.md - Python module templates

Best Practices

Do:

  • Match existing patterns exactly
  • Include all files that similar modules have
  • Use the same folder structure
  • Copy import styles from nearby files

Don't:

  • Introduce new patterns
  • Add "improvements" to the template
  • Skip files that peers have (like tests)
  • Use different naming conventions

Example

Request: "Create a UserCard component"

Detection:

Existing components use:
- Folder structure: ComponentName/index.tsx
- Style: CSS Modules (ComponentName.module.css)
- Tests: ComponentName.test.tsx in same folder
- Types: Props interface in same file
- Exports: default export

Generated files:

src/components/UserCard/
├── index.tsx
├── UserCard.module.css
└── UserCard.test.tsx

index.tsx matches existing style:

import styles from './UserCard.module.css';

interface UserCardProps {
  name: string;
  email: string;
}

export default function UserCard({ name, email }: UserCardProps) {
  return (
    <div className={styles.container}>
      <h3 className={styles.name}>{name}</h3>
      <p className={styles.email}>{email}</p>
    </div>
  );
}

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.