Claude Code Plugins

Community-maintained marketplace

Feedback

スキャフォールディングやボイラープレート生成時に使用。

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name code-generation
description スキャフォールディングやボイラープレート生成時に使用。

Code Generation

鉄則

繰り返し作業は自動化。生成コードも理解する。

ディレクトリ構造

src/
├── components/
├── hooks/
├── services/
├── utils/
└── types/
tests/
docs/

テンプレート例

// templates/component.tsx
import { FC } from 'react';

interface {{Name}}Props {}

export const {{Name}}: FC<{{Name}}Props> = () => {
  return <div>{{Name}}</div>;
};

生成スクリプト

#!/bin/bash
NAME=$1
mkdir -p "src/components/${NAME}"
cat > "src/components/${NAME}/${NAME}.tsx" << EOF
import { FC } from 'react';
export const ${NAME}: FC = () => <div>${NAME}</div>;
EOF

plop.js(推奨)

// plopfile.js
module.exports = function(plop) {
  plop.setGenerator('component', {
    prompts: [{ type: 'input', name: 'name' }],
    actions: [{
      type: 'add',
      path: 'src/components/{{pascalCase name}}.tsx',
      templateFile: 'templates/component.tsx.hbs'
    }]
  });
};

良い生成コード

✅ 人間が読める
✅ プロジェクト規約に従う
✅ テストも生成
✅ 最小限の依存