claude-auto-summary 1.0.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/README.md +71 -0
- package/bin/install.js +108 -0
- package/index.js +27 -0
- package/package.json +38 -0
- package/skills/auto-summary/SKILL.md +117 -0
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# claude-auto-summary
|
|
2
|
+
|
|
3
|
+
Claude Code skill — automatically saves well-structured markdown summaries after web research and information-gathering tasks.
|
|
4
|
+
|
|
5
|
+
## What It Does
|
|
6
|
+
|
|
7
|
+
After you ask Claude Code to search for, find, compare, or gather information about tools, plugins, skills, frameworks, or any topic requiring multiple web searches, this skill makes Claude **automatically save** a structured `.md` summary file to your project — without you having to ask "save this as markdown."
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# One-shot (no global install needed)
|
|
13
|
+
npx claude-auto-summary
|
|
14
|
+
|
|
15
|
+
# Or install globally
|
|
16
|
+
npm install -g claude-auto-summary
|
|
17
|
+
auto-summary-skill
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Skills are copied to `~/.claude/skills/` where Claude Code picks them up automatically.
|
|
21
|
+
|
|
22
|
+
## What Gets Saved
|
|
23
|
+
|
|
24
|
+
Every summary file includes:
|
|
25
|
+
|
|
26
|
+
- **Date stamp** — when the research was done
|
|
27
|
+
- **Categorized sections** — organized by theme/type
|
|
28
|
+
- **Comparison tables** — scannable, actionable
|
|
29
|
+
- **Source links** — every tool/claim has a URL
|
|
30
|
+
- **Quick recommendations** — what to DO, not just what exists
|
|
31
|
+
|
|
32
|
+
## Trigger Conditions
|
|
33
|
+
|
|
34
|
+
The skill activates when:
|
|
35
|
+
|
|
36
|
+
1. You ran 2+ web searches on the same topic
|
|
37
|
+
2. You asked to find skills/plugins/tools for X
|
|
38
|
+
3. You asked to compare options
|
|
39
|
+
4. You gathered facts from multiple sources
|
|
40
|
+
5. You explicitly asked to summarize
|
|
41
|
+
|
|
42
|
+
## Usage
|
|
43
|
+
|
|
44
|
+
### CLI
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# List bundled skills
|
|
48
|
+
auto-summary-skill --list
|
|
49
|
+
|
|
50
|
+
# Preview what would be installed
|
|
51
|
+
auto-summary-skill --dry-run
|
|
52
|
+
|
|
53
|
+
# Install to ~/.claude/skills/
|
|
54
|
+
auto-summary-skill
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Programmatic
|
|
58
|
+
|
|
59
|
+
```javascript
|
|
60
|
+
const skill = require('claude-auto-summary');
|
|
61
|
+
|
|
62
|
+
console.log(skill.skills);
|
|
63
|
+
// => ['auto-summary']
|
|
64
|
+
|
|
65
|
+
const skillPath = skill.getSkillPath('auto-summary');
|
|
66
|
+
// => '/path/to/skills/auto-summary'
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT
|
package/bin/install.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const fs = require('fs');
|
|
5
|
+
const path = require('path');
|
|
6
|
+
|
|
7
|
+
const PACKAGE_NAME = 'claude-auto-summary';
|
|
8
|
+
const SRC_DIR = path.join(__dirname, '..', 'skills');
|
|
9
|
+
const HOME = process.env.HOME || process.env.USERPROFILE;
|
|
10
|
+
const DEST_DIR = path.join(HOME, '.claude', 'skills');
|
|
11
|
+
|
|
12
|
+
function printUsage() {
|
|
13
|
+
console.log(`
|
|
14
|
+
${PACKAGE_NAME} — Install auto-summary skill to Claude Code
|
|
15
|
+
|
|
16
|
+
Usage:
|
|
17
|
+
auto-summary-skill Install the skill
|
|
18
|
+
auto-summary-skill --list List bundled skills
|
|
19
|
+
auto-summary-skill --dry-run Show what would be installed
|
|
20
|
+
auto-summary-skill --help Show this help message
|
|
21
|
+
|
|
22
|
+
Skills are installed to: ${DEST_DIR}
|
|
23
|
+
`);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function listSkills() {
|
|
27
|
+
const meta = require('../index.js');
|
|
28
|
+
console.log(`\n ${PACKAGE_NAME} v${meta.version}`);
|
|
29
|
+
console.log(` ${meta.skillCount} bundled skill(s):\n`);
|
|
30
|
+
for (const skill of meta.skills) {
|
|
31
|
+
console.log(` - ${skill}`);
|
|
32
|
+
}
|
|
33
|
+
console.log();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function copyDirRecursive(src, dest) {
|
|
37
|
+
if (!fs.existsSync(src)) return 0;
|
|
38
|
+
|
|
39
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
40
|
+
let count = 0;
|
|
41
|
+
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
42
|
+
|
|
43
|
+
for (const entry of entries) {
|
|
44
|
+
const srcPath = path.join(src, entry.name);
|
|
45
|
+
const destPath = path.join(dest, entry.name);
|
|
46
|
+
|
|
47
|
+
if (entry.isDirectory()) {
|
|
48
|
+
count += copyDirRecursive(srcPath, destPath);
|
|
49
|
+
} else {
|
|
50
|
+
fs.copyFileSync(srcPath, destPath);
|
|
51
|
+
count++;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return count;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function install(dryRun) {
|
|
58
|
+
if (!fs.existsSync(SRC_DIR)) {
|
|
59
|
+
console.error(' Error: Skills source directory not found at', SRC_DIR);
|
|
60
|
+
process.exit(1);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const skillDirs = fs.readdirSync(SRC_DIR, { withFileTypes: true })
|
|
64
|
+
.filter(d => d.isDirectory())
|
|
65
|
+
.map(d => d.name);
|
|
66
|
+
|
|
67
|
+
if (skillDirs.length === 0) {
|
|
68
|
+
console.log(' No skill directories found to install.');
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
console.log(`\n Installing ${skillDirs.length} skill(s) to ${DEST_DIR}\n`);
|
|
73
|
+
|
|
74
|
+
if (dryRun) {
|
|
75
|
+
for (const dir of skillDirs) {
|
|
76
|
+
console.log(` [dry-run] Would copy: ${dir}`);
|
|
77
|
+
}
|
|
78
|
+
console.log(`\n Destination: ${DEST_DIR}`);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
fs.mkdirSync(DEST_DIR, { recursive: true });
|
|
83
|
+
|
|
84
|
+
let totalFiles = 0;
|
|
85
|
+
for (const dir of skillDirs) {
|
|
86
|
+
const src = path.join(SRC_DIR, dir);
|
|
87
|
+
const dest = path.join(DEST_DIR, dir);
|
|
88
|
+
const count = copyDirRecursive(src, dest);
|
|
89
|
+
totalFiles += count;
|
|
90
|
+
console.log(` Installed: ${dir} (${count} files)`);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
console.log(`\n Done. ${totalFiles} file(s) installed to ${DEST_DIR}`);
|
|
94
|
+
console.log(' Restart Claude Code to activate skills.\n');
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// --- CLI ---
|
|
98
|
+
const args = process.argv.slice(2);
|
|
99
|
+
|
|
100
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
101
|
+
printUsage();
|
|
102
|
+
} else if (args.includes('--list') || args.includes('-l')) {
|
|
103
|
+
listSkills();
|
|
104
|
+
} else if (args.includes('--dry-run')) {
|
|
105
|
+
install(true);
|
|
106
|
+
} else {
|
|
107
|
+
install(false);
|
|
108
|
+
}
|
package/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
const BUNDLED_SKILLS = ['auto-summary'];
|
|
6
|
+
|
|
7
|
+
module.exports = {
|
|
8
|
+
name: 'claude-auto-summary',
|
|
9
|
+
version: '1.0.0',
|
|
10
|
+
skillCount: BUNDLED_SKILLS.length,
|
|
11
|
+
skills: BUNDLED_SKILLS,
|
|
12
|
+
skillsDir: path.join(__dirname, 'skills'),
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Returns the absolute path to a specific skill directory.
|
|
16
|
+
* @param {string} skillName
|
|
17
|
+
* @returns {string}
|
|
18
|
+
*/
|
|
19
|
+
getSkillPath(skillName) {
|
|
20
|
+
if (!BUNDLED_SKILLS.includes(skillName)) {
|
|
21
|
+
throw new Error(
|
|
22
|
+
`Skill "${skillName}" not found. Available: ${BUNDLED_SKILLS.join(', ')}`
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
return path.join(__dirname, 'skills', skillName);
|
|
26
|
+
},
|
|
27
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-auto-summary",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Claude Code skill — automatically saves well-structured markdown summaries after web research and information-gathering tasks",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"auto-summary-skill": "bin/install.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"skills/",
|
|
11
|
+
"bin/",
|
|
12
|
+
"index.js",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"install-skills": "node bin/install.js",
|
|
17
|
+
"list": "node -e \"const s = require('./index.js'); console.log('Skills:', s.skills.join(', '));\""
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"claude-code",
|
|
21
|
+
"claude",
|
|
22
|
+
"skill",
|
|
23
|
+
"auto-summary",
|
|
24
|
+
"research",
|
|
25
|
+
"markdown",
|
|
26
|
+
"writing",
|
|
27
|
+
"documentation"
|
|
28
|
+
],
|
|
29
|
+
"author": "trtr123",
|
|
30
|
+
"license": "MIT",
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": ""
|
|
34
|
+
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=16.0.0"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: auto-summary
|
|
3
|
+
description: Research auto-summary skill — automatically saves well-structured markdown summaries after any substantial web research or information-gathering task. Triggers when the user asks you to search for, find, compare, or gather information about tools, plugins, skills, frameworks, methodologies, or any topic requiring multiple web searches to compile a comprehensive answer. Instead of only replying in-chat, you MUST also write the compiled findings as a well-organized .md file to the project root. This is a behavioral habit — you save first, then tell the user.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Auto-Summary — Research → Markdown Workflow
|
|
7
|
+
|
|
8
|
+
When you perform substantial research (web searches, multi-source information gathering, tool/plugin comparisons), you **automatically save** a structured markdown summary to the project root. Never wait for the user to ask "save this as md" — it is part of completing the research task.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Trigger Conditions
|
|
13
|
+
|
|
14
|
+
Save a summary file when ANY of these are true:
|
|
15
|
+
|
|
16
|
+
1. **Multi-source research**: You ran 2+ web searches on the same topic
|
|
17
|
+
2. **Tool/plugin discovery**: User asked "find skills/plugins/tools for X"
|
|
18
|
+
3. **Comparison tasks**: User asked to compare options, find the best X for Y
|
|
19
|
+
4. **Information compilation**: You gathered facts from multiple URLs or sources
|
|
20
|
+
5. **User explicitly asks**: "summarize", "整理成文档", "保存为md", "记录下来"
|
|
21
|
+
|
|
22
|
+
Do NOT trigger for: single-fact lookups, pure coding Q&A, trivial searches answered in one sentence.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## File Naming Convention
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Claude-Code-{主题关键词}-{类型}.md
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- Use Chinese for the topic keywords (matches user's language)
|
|
33
|
+
- Keep under 40 characters total
|
|
34
|
+
- Replace spaces with `-`
|
|
35
|
+
- Examples:
|
|
36
|
+
- `Claude-Code-写作相关Skill汇总.md`
|
|
37
|
+
- `Claude-Code-现实主义小说插件汇总.md`
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Markdown Structure Template
|
|
42
|
+
|
|
43
|
+
Every summary file MUST include these sections (order can adapt to content):
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
# {Title}
|
|
47
|
+
|
|
48
|
+
> 搜索日期:{YYYY-MM-DD}
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## 一、{Category 1}
|
|
53
|
+
|
|
54
|
+
### 1. [{Name}]({URL}) — {One-line tagline}
|
|
55
|
+
|
|
56
|
+
| 维度 | 说明 |
|
|
57
|
+
|------|------|
|
|
58
|
+
| ... | ... |
|
|
59
|
+
|
|
60
|
+
**{适配/应用场景}**:...
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 二、{Category 2}
|
|
65
|
+
|
|
66
|
+
...
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## {快速推荐 / 推荐组合}
|
|
71
|
+
|
|
72
|
+
| 需求 | 推荐 | 理由 |
|
|
73
|
+
|------|------|------|
|
|
74
|
+
| ... | ... | ... |
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## {关键提示 / 注意事项}
|
|
79
|
+
|
|
80
|
+
1. ...
|
|
81
|
+
2. ...
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Quality Rules
|
|
87
|
+
|
|
88
|
+
1. **Date stamp**: Always include the search date under the title
|
|
89
|
+
2. **Source links**: Every tool/plugin MUST have a clickable URL to its source (GitHub, npm, etc.)
|
|
90
|
+
3. **Comparison tables**: When presenting multiple options, use tables for scannability
|
|
91
|
+
4. **Actionable recommendations**: End with "快速推荐" or "推荐组合" — the user should know what to DO
|
|
92
|
+
5. **Concrete details**: Version numbers, command examples, install methods — not just descriptions
|
|
93
|
+
6. **Chinese naming**: File names and section headers in Chinese if the user communicates in Chinese
|
|
94
|
+
7. **Concise but complete**: Each tool gets one focused block, not paragraphs of narration
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Workflow
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
1. Complete research (web searches, source fetching)
|
|
102
|
+
2. Compile findings in your response to the user
|
|
103
|
+
3. IMMEDIATELY after (or in parallel with) responding, Write the .md file
|
|
104
|
+
4. Confirm file path to user
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
The markdown file should be **self-contained** — someone reading it 3 months later should get full context without seeing the chat history.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Anti-patterns
|
|
112
|
+
|
|
113
|
+
- ❌ Replying with findings but not saving the file
|
|
114
|
+
- ❌ Asking "should I save this?" — just do it
|
|
115
|
+
- ❌ Saving raw search result dumps — curate and structure
|
|
116
|
+
- ❌ Forgetting source URLs — every claim needs a link
|
|
117
|
+
- ❌ Over-narrating in the file — tables > paragraphs
|