@skillkit/resources 1.8.0
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/LICENSE +190 -0
- package/dist/agents/index.d.ts +43 -0
- package/dist/agents/index.js +241 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/commands/index.d.ts +27 -0
- package/dist/commands/index.js +265 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/guidelines/index.d.ts +28 -0
- package/dist/guidelines/index.js +215 -0
- package/dist/guidelines/index.js.map +1 -0
- package/dist/hooks/index.d.ts +30 -0
- package/dist/hooks/index.js +164 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +991 -0
- package/dist/index.js.map +1 -0
- package/dist/profiles/index.d.ts +26 -0
- package/dist/profiles/index.js +110 -0
- package/dist/profiles/index.js.map +1 -0
- package/package.json +57 -0
- package/templates/agents/architect.md +54 -0
- package/templates/agents/build-error-resolver.md +64 -0
- package/templates/agents/code-reviewer.md +83 -0
- package/templates/agents/doc-updater.md +67 -0
- package/templates/agents/e2e-runner.md +99 -0
- package/templates/agents/planner.md +112 -0
- package/templates/agents/refactor-cleaner.md +101 -0
- package/templates/agents/security-reviewer.md +130 -0
- package/templates/agents/tdd-guide.md +152 -0
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
// src/hooks/manifest.ts
|
|
2
|
+
var HOOK_TEMPLATES = [
|
|
3
|
+
{
|
|
4
|
+
id: "typescript-check",
|
|
5
|
+
name: "TypeScript Type Check",
|
|
6
|
+
description: "Run TypeScript type checking before commits",
|
|
7
|
+
category: "quality",
|
|
8
|
+
event: "commit:pre",
|
|
9
|
+
command: "npx tsc --noEmit",
|
|
10
|
+
timeout: 6e4,
|
|
11
|
+
blocking: true
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
id: "eslint-check",
|
|
15
|
+
name: "ESLint Check",
|
|
16
|
+
description: "Run ESLint on staged files before commits",
|
|
17
|
+
category: "quality",
|
|
18
|
+
event: "commit:pre",
|
|
19
|
+
command: 'files=$(git diff --cached --name-only --diff-filter=d | grep -E "\\.(js|ts|jsx|tsx)$"); [ -z "$files" ] || npx eslint --fix $files',
|
|
20
|
+
timeout: 6e4,
|
|
21
|
+
blocking: true
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "prettier-format",
|
|
25
|
+
name: "Prettier Format",
|
|
26
|
+
description: "Format staged files with Prettier before commits",
|
|
27
|
+
category: "quality",
|
|
28
|
+
event: "commit:pre",
|
|
29
|
+
command: "npx prettier --write $(git diff --cached --name-only --diff-filter=d)",
|
|
30
|
+
timeout: 3e4,
|
|
31
|
+
blocking: false
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "test-on-save",
|
|
35
|
+
name: "Run Tests on Save",
|
|
36
|
+
description: "Run related tests when test files are saved",
|
|
37
|
+
category: "quality",
|
|
38
|
+
event: "file:save",
|
|
39
|
+
matcher: "**/*.test.{ts,tsx,js,jsx}",
|
|
40
|
+
command: "npx vitest run {{file}}",
|
|
41
|
+
timeout: 12e4,
|
|
42
|
+
blocking: false
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
id: "security-scan",
|
|
46
|
+
name: "Security Scan",
|
|
47
|
+
description: "Scan for security vulnerabilities before commits",
|
|
48
|
+
category: "security",
|
|
49
|
+
event: "commit:pre",
|
|
50
|
+
command: "npm audit --audit-level=high",
|
|
51
|
+
timeout: 6e4,
|
|
52
|
+
blocking: true
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "secret-detection",
|
|
56
|
+
name: "Secret Detection",
|
|
57
|
+
description: "Detect secrets in staged files before commits",
|
|
58
|
+
category: "security",
|
|
59
|
+
event: "commit:pre",
|
|
60
|
+
command: 'files=$(git diff --cached --name-only --diff-filter=d); [ -z "$files" ] || npx secretlint $files',
|
|
61
|
+
timeout: 3e4,
|
|
62
|
+
blocking: true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
id: "build-check",
|
|
66
|
+
name: "Build Check",
|
|
67
|
+
description: "Verify build succeeds before commits",
|
|
68
|
+
category: "quality",
|
|
69
|
+
event: "commit:pre",
|
|
70
|
+
command: "npm run build",
|
|
71
|
+
timeout: 3e5,
|
|
72
|
+
blocking: true
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "session-summary",
|
|
76
|
+
name: "Session Summary",
|
|
77
|
+
description: "Generate session summary on session end",
|
|
78
|
+
category: "productivity",
|
|
79
|
+
event: "session:end",
|
|
80
|
+
command: 'echo "Session ended at $(date)" >> ~/.skillkit/sessions/$(date +%Y-%m-%d).log',
|
|
81
|
+
timeout: 5e3,
|
|
82
|
+
blocking: false
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
id: "auto-commit-message",
|
|
86
|
+
name: "Auto Commit Message",
|
|
87
|
+
description: "Generate conventional commit message",
|
|
88
|
+
category: "workflow",
|
|
89
|
+
event: "commit:pre",
|
|
90
|
+
command: "git diff --cached --stat",
|
|
91
|
+
timeout: 5e3,
|
|
92
|
+
blocking: false
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: "notify-build-fail",
|
|
96
|
+
name: "Build Failure Notification",
|
|
97
|
+
description: "Notify on build failure",
|
|
98
|
+
category: "workflow",
|
|
99
|
+
event: "build:fail",
|
|
100
|
+
command: 'echo "Build failed at $(date)" | tee -a ~/.skillkit/build.log',
|
|
101
|
+
timeout: 5e3,
|
|
102
|
+
blocking: false
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: "test-coverage-check",
|
|
106
|
+
name: "Test Coverage Check",
|
|
107
|
+
description: "Verify test coverage meets threshold before commits",
|
|
108
|
+
category: "quality",
|
|
109
|
+
event: "commit:pre",
|
|
110
|
+
command: `npm test -- --coverage --coverageThreshold='{"global":{"statements":80}}'`,
|
|
111
|
+
timeout: 18e4,
|
|
112
|
+
blocking: true
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
id: "dependency-check",
|
|
116
|
+
name: "Dependency Check",
|
|
117
|
+
description: "Check for outdated dependencies on session start",
|
|
118
|
+
category: "productivity",
|
|
119
|
+
event: "session:start",
|
|
120
|
+
command: "npm outdated || true",
|
|
121
|
+
timeout: 3e4,
|
|
122
|
+
blocking: false
|
|
123
|
+
}
|
|
124
|
+
];
|
|
125
|
+
var HOOK_TEMPLATE_MANIFEST = {
|
|
126
|
+
version: 1,
|
|
127
|
+
templates: HOOK_TEMPLATES
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
// src/hooks/index.ts
|
|
131
|
+
function getHookTemplates() {
|
|
132
|
+
return HOOK_TEMPLATES;
|
|
133
|
+
}
|
|
134
|
+
function getHookTemplate(id) {
|
|
135
|
+
return HOOK_TEMPLATES.find((t) => t.id === id) || null;
|
|
136
|
+
}
|
|
137
|
+
function getHookTemplatesByCategory(category) {
|
|
138
|
+
return HOOK_TEMPLATES.filter((t) => t.category === category);
|
|
139
|
+
}
|
|
140
|
+
function getHookTemplatesByEvent(event) {
|
|
141
|
+
return HOOK_TEMPLATES.filter((t) => t.event === event);
|
|
142
|
+
}
|
|
143
|
+
function getHookTemplateIds() {
|
|
144
|
+
return HOOK_TEMPLATES.map((t) => t.id);
|
|
145
|
+
}
|
|
146
|
+
function formatHookCommand(template, variables) {
|
|
147
|
+
let command = template.command;
|
|
148
|
+
const vars = { ...template.variables, ...variables };
|
|
149
|
+
for (const [key, value] of Object.entries(vars)) {
|
|
150
|
+
command = command.replace(new RegExp(`\\{\\{${key}\\}\\}`, "g"), value);
|
|
151
|
+
}
|
|
152
|
+
return command;
|
|
153
|
+
}
|
|
154
|
+
export {
|
|
155
|
+
HOOK_TEMPLATES,
|
|
156
|
+
HOOK_TEMPLATE_MANIFEST,
|
|
157
|
+
formatHookCommand,
|
|
158
|
+
getHookTemplate,
|
|
159
|
+
getHookTemplateIds,
|
|
160
|
+
getHookTemplates,
|
|
161
|
+
getHookTemplatesByCategory,
|
|
162
|
+
getHookTemplatesByEvent
|
|
163
|
+
};
|
|
164
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/manifest.ts","../../src/hooks/index.ts"],"sourcesContent":["import type { HookTemplate, HookTemplateManifest } from './types.js';\n\nexport const HOOK_TEMPLATES: HookTemplate[] = [\n {\n id: 'typescript-check',\n name: 'TypeScript Type Check',\n description: 'Run TypeScript type checking before commits',\n category: 'quality',\n event: 'commit:pre',\n command: 'npx tsc --noEmit',\n timeout: 60000,\n blocking: true,\n },\n {\n id: 'eslint-check',\n name: 'ESLint Check',\n description: 'Run ESLint on staged files before commits',\n category: 'quality',\n event: 'commit:pre',\n command: 'files=$(git diff --cached --name-only --diff-filter=d | grep -E \"\\\\.(js|ts|jsx|tsx)$\"); [ -z \"$files\" ] || npx eslint --fix $files',\n timeout: 60000,\n blocking: true,\n },\n {\n id: 'prettier-format',\n name: 'Prettier Format',\n description: 'Format staged files with Prettier before commits',\n category: 'quality',\n event: 'commit:pre',\n command: 'npx prettier --write $(git diff --cached --name-only --diff-filter=d)',\n timeout: 30000,\n blocking: false,\n },\n {\n id: 'test-on-save',\n name: 'Run Tests on Save',\n description: 'Run related tests when test files are saved',\n category: 'quality',\n event: 'file:save',\n matcher: '**/*.test.{ts,tsx,js,jsx}',\n command: 'npx vitest run {{file}}',\n timeout: 120000,\n blocking: false,\n },\n {\n id: 'security-scan',\n name: 'Security Scan',\n description: 'Scan for security vulnerabilities before commits',\n category: 'security',\n event: 'commit:pre',\n command: 'npm audit --audit-level=high',\n timeout: 60000,\n blocking: true,\n },\n {\n id: 'secret-detection',\n name: 'Secret Detection',\n description: 'Detect secrets in staged files before commits',\n category: 'security',\n event: 'commit:pre',\n command: 'files=$(git diff --cached --name-only --diff-filter=d); [ -z \"$files\" ] || npx secretlint $files',\n timeout: 30000,\n blocking: true,\n },\n {\n id: 'build-check',\n name: 'Build Check',\n description: 'Verify build succeeds before commits',\n category: 'quality',\n event: 'commit:pre',\n command: 'npm run build',\n timeout: 300000,\n blocking: true,\n },\n {\n id: 'session-summary',\n name: 'Session Summary',\n description: 'Generate session summary on session end',\n category: 'productivity',\n event: 'session:end',\n command: 'echo \"Session ended at $(date)\" >> ~/.skillkit/sessions/$(date +%Y-%m-%d).log',\n timeout: 5000,\n blocking: false,\n },\n {\n id: 'auto-commit-message',\n name: 'Auto Commit Message',\n description: 'Generate conventional commit message',\n category: 'workflow',\n event: 'commit:pre',\n command: 'git diff --cached --stat',\n timeout: 5000,\n blocking: false,\n },\n {\n id: 'notify-build-fail',\n name: 'Build Failure Notification',\n description: 'Notify on build failure',\n category: 'workflow',\n event: 'build:fail',\n command: 'echo \"Build failed at $(date)\" | tee -a ~/.skillkit/build.log',\n timeout: 5000,\n blocking: false,\n },\n {\n id: 'test-coverage-check',\n name: 'Test Coverage Check',\n description: 'Verify test coverage meets threshold before commits',\n category: 'quality',\n event: 'commit:pre',\n command: 'npm test -- --coverage --coverageThreshold=\\'{\"global\":{\"statements\":80}}\\'',\n timeout: 180000,\n blocking: true,\n },\n {\n id: 'dependency-check',\n name: 'Dependency Check',\n description: 'Check for outdated dependencies on session start',\n category: 'productivity',\n event: 'session:start',\n command: 'npm outdated || true',\n timeout: 30000,\n blocking: false,\n },\n];\n\nexport const HOOK_TEMPLATE_MANIFEST: HookTemplateManifest = {\n version: 1,\n templates: HOOK_TEMPLATES,\n};\n","import { HOOK_TEMPLATES, HOOK_TEMPLATE_MANIFEST } from './manifest.js';\nimport type {\n HookTemplate,\n HookTemplateCategory,\n HookEvent,\n HookTemplateManifest,\n} from './types.js';\n\nexport type { HookTemplate, HookTemplateCategory, HookEvent, HookTemplateManifest };\nexport { HOOK_TEMPLATES, HOOK_TEMPLATE_MANIFEST };\n\nexport function getHookTemplates(): HookTemplate[] {\n return HOOK_TEMPLATES;\n}\n\nexport function getHookTemplate(id: string): HookTemplate | null {\n return HOOK_TEMPLATES.find(t => t.id === id) || null;\n}\n\nexport function getHookTemplatesByCategory(category: HookTemplateCategory): HookTemplate[] {\n return HOOK_TEMPLATES.filter(t => t.category === category);\n}\n\nexport function getHookTemplatesByEvent(event: HookEvent): HookTemplate[] {\n return HOOK_TEMPLATES.filter(t => t.event === event);\n}\n\nexport function getHookTemplateIds(): string[] {\n return HOOK_TEMPLATES.map(t => t.id);\n}\n\nexport function formatHookCommand(template: HookTemplate, variables?: Record<string, string>): string {\n let command = template.command;\n const vars = { ...template.variables, ...variables };\n\n for (const [key, value] of Object.entries(vars)) {\n command = command.replace(new RegExp(`\\\\{\\\\{${key}\\\\}\\\\}`, 'g'), value);\n }\n\n return command;\n}\n"],"mappings":";AAEO,IAAM,iBAAiC;AAAA,EAC5C;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,IACT,UAAU;AAAA,E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AS,gBAAgB,IAAiC;AAC/D,SAAO,eAAe,KAAK,OAAK,EAAE,OAAO,EAAE,KAAK;AAClD;AAEO,SAAS,2BAA2B,UAAgD;AACzF,SAAO,eAAe,OAAO,OAAK,EAAE,aAAa,QAAQ;AAC3D;AAEO,SAAS,wBAAwB,OAAkC;AACxE,SAAO,eAAe,OAAO,OAAK,EAAE,UAAU,KAAK;AACrD;AAEO,SAAS,qBAA+B;AAC7C,SAAO,eAAe,IAAI,OAAK,EAAE,EAAE;AACrC;AAEO,SAAS,kBAAkB,UAAwB,WAA4C;AACpG,MAAI,UAAU,SAAS;AACvB,QAAM,OAAO,EAAE,GAAG,SAAS,WAAW,GAAG,UAAU;AAEnD,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,IAAI,GAAG;AAC/C,cAAU,QAAQ,QAAQ,IAAI,OAAO,SAAS,GAAG,UAAU,GAAG,GAAG,KAAK;AAAA,EACxE;AAEA,SAAO;AACT;","names":[]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { AGENT_MANIFEST, AgentCategory, AgentInstallOptions, AgentInstallResult, AgentManifest, BUNDLED_AGENTS, BundledAgent, getAgentTemplate, getAvailableAgents, getBundledAgent, getBundledAgentIds, getBundledAgents, getBundledAgentsByCategory, getInstalledAgentIds, installBundledAgent, isAgentInstalled } from './agents/index.js';
|
|
2
|
+
export { COMMAND_MANIFEST, COMMAND_TEMPLATES, CommandCategory, CommandManifest, CommandTemplate, getCommandByTrigger, getCommandTemplate, getCommandTemplateIds, getCommandTemplates, getCommandTemplatesByCategory, getCommandTriggers } from './commands/index.js';
|
|
3
|
+
export { BUILTIN_PROFILES, OperationalProfile, PROFILE_MANIFEST, ProfileManifest, ProfileName, getBuiltinProfile, getBuiltinProfiles, getProfileContext, getProfileNames, isValidProfileName } from './profiles/index.js';
|
|
4
|
+
export { BUILTIN_GUIDELINES, GUIDELINE_MANIFEST, Guideline, GuidelineCategory, GuidelineManifest, getBuiltinGuideline, getBuiltinGuidelines, getEnabledGuidelines, getGuidelineContent, getGuidelineIds, getGuidelinesByCategory, getGuidelinesSortedByPriority } from './guidelines/index.js';
|
|
5
|
+
export { HOOK_TEMPLATES, HOOK_TEMPLATE_MANIFEST, HookEvent, HookTemplate, HookTemplateCategory, HookTemplateManifest, formatHookCommand, getHookTemplate, getHookTemplateIds, getHookTemplates, getHookTemplatesByCategory, getHookTemplatesByEvent } from './hooks/index.js';
|
|
6
|
+
|
|
7
|
+
declare const RESOURCES_VERSION = "2.0.0";
|
|
8
|
+
|
|
9
|
+
export { RESOURCES_VERSION };
|