cp-toolkit 2.2.0 ā 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/init.js +29 -3
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -91,13 +91,38 @@ export async function initCommand(directory, options) {
|
|
|
91
91
|
// Create standard instruction files
|
|
92
92
|
await createInstructionFiles(instructionsTargetDir);
|
|
93
93
|
|
|
94
|
-
//
|
|
94
|
+
// 4. Setup .github/skills/ (essential skills referenced by agents)
|
|
95
|
+
spinner.text = 'Copying essential skills...';
|
|
96
|
+
const skillsTargetDir = path.join(targetDir, '.github', 'skills');
|
|
97
|
+
await fs.ensureDir(skillsTargetDir);
|
|
98
|
+
|
|
99
|
+
// Copy essential skills that agents reference
|
|
100
|
+
const essentialSkills = [
|
|
101
|
+
'mobile-design',
|
|
102
|
+
'frontend-design',
|
|
103
|
+
'api-patterns',
|
|
104
|
+
'database-design',
|
|
105
|
+
'testing-patterns',
|
|
106
|
+
'deployment-procedures',
|
|
107
|
+
'architecture'
|
|
108
|
+
];
|
|
109
|
+
|
|
110
|
+
for (const skill of essentialSkills) {
|
|
111
|
+
const skillSourceDir = path.join(templatesDir, 'skills', 'optional', skill);
|
|
112
|
+
if (fs.existsSync(skillSourceDir)) {
|
|
113
|
+
const skillTargetDir = path.join(skillsTargetDir, skill);
|
|
114
|
+
await fs.ensureDir(skillTargetDir);
|
|
115
|
+
await fs.copy(skillSourceDir, skillTargetDir, { overwrite: true });
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// 5. Setup .github/copilot-instructions.md
|
|
95
120
|
spinner.text = 'Creating copilot-instructions.md...';
|
|
96
121
|
const instructionsPath = path.join(targetDir, '.github', 'copilot-instructions.md');
|
|
97
122
|
const instructionsContent = generateCopilotInstructions(config);
|
|
98
123
|
await fs.writeFile(instructionsPath, instructionsContent);
|
|
99
124
|
|
|
100
|
-
//
|
|
125
|
+
// 6. Setup .vscode/mcp.json
|
|
101
126
|
spinner.text = 'Configuring MCP Server...';
|
|
102
127
|
const vscodeDir = path.join(targetDir, '.vscode');
|
|
103
128
|
await fs.ensureDir(vscodeDir);
|
|
@@ -131,7 +156,7 @@ export async function initCommand(directory, options) {
|
|
|
131
156
|
JSON.stringify(mcpConfig, null, 2)
|
|
132
157
|
);
|
|
133
158
|
|
|
134
|
-
//
|
|
159
|
+
// 7. Copy workflows to .github/workflows-copilot/ (optional reference)
|
|
135
160
|
if (config.installEverything) {
|
|
136
161
|
spinner.text = 'Copying workflows...';
|
|
137
162
|
const workflowsSourceDir = path.join(templatesDir, 'workflows');
|
|
@@ -147,6 +172,7 @@ export async function initCommand(directory, options) {
|
|
|
147
172
|
console.log(chalk.bold('\nš Created structure:'));
|
|
148
173
|
console.log(chalk.dim(' .github/'));
|
|
149
174
|
console.log(chalk.dim(' āāā agents/ ') + chalk.cyan('ā 20 specialist agents'));
|
|
175
|
+
console.log(chalk.dim(' āāā skills/ ') + chalk.cyan('ā Essential skills library'));
|
|
150
176
|
console.log(chalk.dim(' āāā instructions/ ') + chalk.cyan('ā Language-specific rules'));
|
|
151
177
|
console.log(chalk.dim(' āāā copilot-workflows/') + chalk.cyan('ā Workflow templates'));
|
|
152
178
|
console.log(chalk.dim(' āāā copilot-instructions.md'));
|