@1aboveio/core-skills 0.1.1 → 0.1.2
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 +2 -1
- package/package.json +3 -3
- package/skills/distill-writing/SKILL.md +1 -1
- package/skills/doc-to-md/SKILL.md +1 -1
- package/skills/editorial-review/SKILL.md +1 -1
- package/skills/house-style/SKILL.md +1 -1
- package/skills/plain-language/LICENSE +3 -0
- package/skills/plain-language/SKILL.md +57 -0
- package/skills/plain-language/release-check.mjs +93 -0
- package/skills/polish-cn/SKILL.md +1 -1
- package/skills/reg-parser/SKILL.md +1 -1
- package/skills/terminology/SKILL.md +1 -1
- package/skills/write-doc/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @1aboveio/core-skills
|
|
2
2
|
|
|
3
|
-
Shared writing and document foundation: house style, editorial review, Chinese polish, terminology, write-doc, distill-writing, doc-to-md and reg-parser.
|
|
3
|
+
Shared writing and document foundation: house style, plain-language replies, editorial review, Chinese polish, terminology, write-doc, distill-writing, doc-to-md and reg-parser.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -16,6 +16,7 @@ pi install npm:@1aboveio/core-skills
|
|
|
16
16
|
- `doc-to-md`
|
|
17
17
|
- `editorial-review`
|
|
18
18
|
- `house-style`
|
|
19
|
+
- `plain-language`
|
|
19
20
|
- `polish-cn`
|
|
20
21
|
- `reg-parser`
|
|
21
22
|
- `terminology`
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1aboveio/core-skills",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Shared writing and document foundation: house style, editorial review, Chinese polish, terminology, write-doc, distill-writing, doc-to-md and reg-parser.",
|
|
3
|
+
"version": "0.1.2",
|
|
4
|
+
"description": "Shared writing and document foundation: house style, plain-language replies, editorial review, Chinese polish, terminology, write-doc, distill-writing, doc-to-md and reg-parser.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"id": "core",
|
|
28
28
|
"core": "@1aboveio/core-skills",
|
|
29
29
|
"coreSkills": [],
|
|
30
|
-
"digest": "
|
|
30
|
+
"digest": "8e117712147abec54c9178757b5608409c4d293babd4dacec6ee9906c20b6bf7"
|
|
31
31
|
},
|
|
32
32
|
"publishConfig": {
|
|
33
33
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: distill-writing
|
|
3
3
|
description: "Learn a house writing style from approved sample documents into the project's WRITING.md and writing/templates/, with evidence per rule, conflicts surfaced and manual edits kept. Use when given reference documents to learn from, or to set up or refresh the house style. NOT for writing a document (write-doc)."
|
|
4
|
-
release-version: 0.
|
|
4
|
+
release-version: 0.39.0
|
|
5
5
|
---
|
|
6
6
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
7
7
|
# Distill a writing style
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: doc-to-md
|
|
3
3
|
description: "Convert documents (PDF, DOCX, PPTX, XLSX, images) to Markdown so agents can read them. Use as the preprocessing step whenever binary files need to enter agent context — contract review, compliance audit, document analysis, evidence review."
|
|
4
|
-
release-version: 0.
|
|
4
|
+
release-version: 0.39.0
|
|
5
5
|
---
|
|
6
6
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
7
7
|
# doc-to-md
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: editorial-review
|
|
3
3
|
description: "Review a document or generated report for what it says (does the reader get the answer, is the argument sound, is anything unsupported, obvious or repeated), then fix the content. Use to review, tighten or clarify a doc or report, and as the review step of write-doc and the report skills. NOT for Chinese wording (polish-cn) or code review (better-review)."
|
|
4
|
-
release-version: 0.
|
|
4
|
+
release-version: 0.39.0
|
|
5
5
|
---
|
|
6
6
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
7
7
|
# Editorial review
|
|
@@ -3,7 +3,7 @@ name: house-style
|
|
|
3
3
|
description: "Shared reference the writing skills read by path: WRITING.md lookup and precedence, template choice, gap markers, template shape, the bundled templates, and the default English and Chinese style guides. Never select or invoke it as a task."
|
|
4
4
|
disable-model-invocation: true
|
|
5
5
|
user-invocable: false
|
|
6
|
-
release-version: 0.
|
|
6
|
+
release-version: 0.39.0
|
|
7
7
|
---
|
|
8
8
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
9
9
|
# House style
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plain-language
|
|
3
|
+
description: "Session mode: every reply and status line in plain language — lead with the point, everyday words, full sentences, no filler — in English or Chinese, until turned off. Use for /plain-language, \"plain language mode\", \"talk plainly\", \"说人话\", or when the user's instructions say to use plain-language. Turn off with \"/plain-language off\" or \"normal mode\". NOT for writing a document (write-doc) or reviewing one (editorial-review)."
|
|
4
|
+
release-version: 0.39.0
|
|
5
|
+
---
|
|
6
|
+
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
7
|
+
# Plain language
|
|
8
|
+
|
|
9
|
+
Write every reply in this style for the rest of the session, including status lines and
|
|
10
|
+
summaries, until the user says `/plain-language off` or "normal mode". A switch to another
|
|
11
|
+
reply style (such as caveman) also ends it.
|
|
12
|
+
|
|
13
|
+
- Invoked with no other request: reply in one line that the mode is on. Otherwise do not
|
|
14
|
+
mention the mode; just answer in it.
|
|
15
|
+
- Invoked with `off`: reply in one line that the mode is off, and stop following this page.
|
|
16
|
+
- Code, commands, file paths, identifiers, error text and commit messages stay exact.
|
|
17
|
+
- Follow the section for the reply's language; a mixed reply follows both.
|
|
18
|
+
|
|
19
|
+
## Every reply
|
|
20
|
+
|
|
21
|
+
- **Lead with the point.** The answer or recommendation first, then the reasons.
|
|
22
|
+
- **Cut every word that does no work.** No greeting, no restating the question, no recap
|
|
23
|
+
of what you just said.
|
|
24
|
+
- **Fit the length to the question.** A short question gets a short answer; add detail
|
|
25
|
+
only when the reader needs it to act.
|
|
26
|
+
- **Use the short everyday word.** Explain a needed technical term in a few words the first
|
|
27
|
+
time. Never leverage, robust, seamless, holistic, streamline, delve.
|
|
28
|
+
- **Name who does what.** "The script deletes the branch", not "the branch is deleted".
|
|
29
|
+
- **State findings plainly; hedge only real uncertainty, and say what it depends on.**
|
|
30
|
+
- **Write full sentences, not telegraphic notes.** Keep if, when, because and but.
|
|
31
|
+
Example: "It is 0 if there were no collections," not "0 when none."
|
|
32
|
+
- **Give every range its endpoints and say which are included.**
|
|
33
|
+
- **When "and" and "or" meet in one condition, group them.** Give each condition its subject.
|
|
34
|
+
- **Make every "it", "this" and "they" point to one obvious noun.**
|
|
35
|
+
- **Never add a number, date, condition or cause you do not have,** and never turn "may"
|
|
36
|
+
into "will".
|
|
37
|
+
- One thought per sentence; most sentences under 25 words.
|
|
38
|
+
- Between tool calls, write one plain sentence on what you are doing and why, or nothing.
|
|
39
|
+
|
|
40
|
+
## 中文回复
|
|
41
|
+
|
|
42
|
+
- 先给结论,再给理由;不写问候式开场、宣传口号和空泛形容。
|
|
43
|
+
- 写完整的句子,不写电报体。示例:`若窗口内无收款,则为 0`,而不是 `无收款为 0`。
|
|
44
|
+
- 区间和阈值写明端点,并写明端点是否包含。
|
|
45
|
+
- 并列的条件逐个写全对象。示例:`客户已认证,且客户是个人或商户`,而不是 `客户是个人或商户且已认证`。
|
|
46
|
+
- 指代可能不清时,用具体名称替代「该」「其」「此」「上述」「相关」。
|
|
47
|
+
- 不用掩盖具体动作的词,改写为实际含义:赋能 → 提供;抓手 → 关键措施;对齐 → 统一、确认一致;拉通 / 打通 → 连接。
|
|
48
|
+
- 不用装饰性连接词:值得注意的是、不难看出、综上所述。
|
|
49
|
+
- 中文与英文、数字之间加一个半角空格。
|
|
50
|
+
|
|
51
|
+
## When a rule makes a reply worse
|
|
52
|
+
|
|
53
|
+
Fix the sentence another way. Never shorten a warning, an irreversible step or an ordered
|
|
54
|
+
procedure to save words.
|
|
55
|
+
|
|
56
|
+
Full guides: [style-en](../house-style/references/style-en.md),
|
|
57
|
+
[style-zh](../house-style/references/style-zh.md) (from `house-style`, when installed).
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { spawnSync } from 'node:child_process';
|
|
3
|
+
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
4
|
+
import { homedir } from 'node:os';
|
|
5
|
+
import { dirname, join } from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
7
|
+
|
|
8
|
+
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
9
|
+
const WEEK_MS = 7 * DAY_MS;
|
|
10
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
11
|
+
|
|
12
|
+
function readJson(path, fallback = {}) {
|
|
13
|
+
try { return JSON.parse(readFileSync(path, 'utf8')); } catch { return fallback; }
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function frontmatterValue(text, key) {
|
|
17
|
+
const frontmatter = /^---\n([\s\S]*?)\n---/.exec(text)?.[1] ?? '';
|
|
18
|
+
const match = new RegExp('^' + key + ':\\s*([^\\n]+)$', 'm').exec(frontmatter);
|
|
19
|
+
return match?.[1].trim().replace(/^['"]|['"]$/g, '') ?? null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function repositoryOf(source) {
|
|
23
|
+
const value = String(source ?? '').trim();
|
|
24
|
+
const match = /^(?:git@github\.com:|https:\/\/github\.com\/)?([A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+?)(?:\.git)?$/.exec(value);
|
|
25
|
+
return match?.[1] ?? null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function stableVersion(value) {
|
|
29
|
+
const match = /^v?(\d+)\.(\d+)\.(\d+)$/.exec(String(value ?? '').trim());
|
|
30
|
+
return match ? match.slice(1).map(Number) : null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function newer(left, right) {
|
|
34
|
+
for (let index = 0; index < 3; index += 1) {
|
|
35
|
+
if (left[index] !== right[index]) return left[index] > right[index];
|
|
36
|
+
}
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function writeCache(path, value) {
|
|
41
|
+
try {
|
|
42
|
+
mkdirSync(dirname(path), { recursive: true });
|
|
43
|
+
writeFileSync(path, JSON.stringify(value));
|
|
44
|
+
} catch { /* A read-only cache must not block skill use. */ }
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function main(now = Date.now()) {
|
|
48
|
+
if (process.env.ONEABOVEIO_NO_UPDATE_CHECK) return;
|
|
49
|
+
const skill = readFileSync(join(here, 'SKILL.md'), 'utf8');
|
|
50
|
+
const name = frontmatterValue(skill, 'name');
|
|
51
|
+
const localVersion = stableVersion(frontmatterValue(skill, 'release-version'));
|
|
52
|
+
if (!name || !localVersion) return;
|
|
53
|
+
|
|
54
|
+
const lock = readJson(join(process.env.HOME || homedir(), '.agents', '.skill-lock.json'));
|
|
55
|
+
const entry = lock.skills?.[name];
|
|
56
|
+
const repository = repositoryOf(entry?.sourceUrl || entry?.source);
|
|
57
|
+
if (!repository) return;
|
|
58
|
+
|
|
59
|
+
const cacheRoot = process.env.XDG_CACHE_HOME || join(process.env.HOME || homedir(), '.cache');
|
|
60
|
+
const cachePath = join(cacheRoot, '1aboveio-skills', 'release-check.json');
|
|
61
|
+
const all = readJson(cachePath);
|
|
62
|
+
const cache = all[repository] && typeof all[repository] === 'object' ? all[repository] : {};
|
|
63
|
+
|
|
64
|
+
if (!cache.lastCheck || now - cache.lastCheck >= DAY_MS) {
|
|
65
|
+
const result = spawnSync('gh', ['api', 'repos/' + repository + '/releases/latest', '--jq', '.tag_name'], {
|
|
66
|
+
encoding: 'utf8',
|
|
67
|
+
stdio: ['ignore', 'pipe', 'ignore'],
|
|
68
|
+
timeout: 1500,
|
|
69
|
+
});
|
|
70
|
+
cache.lastCheck = now;
|
|
71
|
+
if (result.status === 0 && stableVersion(result.stdout)) cache.latestTag = result.stdout.trim();
|
|
72
|
+
else delete cache.latestTag;
|
|
73
|
+
all[repository] = cache;
|
|
74
|
+
writeCache(cachePath, all);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
const latestVersion = stableVersion(cache.latestTag);
|
|
78
|
+
if (!latestVersion || !newer(latestVersion, localVersion)) return;
|
|
79
|
+
if (cache.notifiedTag === cache.latestTag && cache.notifiedAt && now - cache.notifiedAt < WEEK_MS) return;
|
|
80
|
+
|
|
81
|
+
cache.notifiedTag = cache.latestTag;
|
|
82
|
+
cache.notifiedAt = now;
|
|
83
|
+
all[repository] = cache;
|
|
84
|
+
writeCache(cachePath, all);
|
|
85
|
+
const command = `npx skills@1.5.23 add '${repository}#${cache.latestTag}' --global --agent universal claude-code --skill ${name} --yes`;
|
|
86
|
+
process.stdout.write(
|
|
87
|
+
`UPDATE_AVAILABLE: A newer 1AboveIO skills release (${cache.latestTag}) is available; this skill is `
|
|
88
|
+
+ `v${localVersion.join('.')}. Ask once whether to refresh ${name}. On approval run \`${command}\`. `
|
|
89
|
+
+ 'The refreshed instructions apply next session. Either way, continue the current task and do not ask again this session.\n',
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
try { main(); } catch { /* Update checks are advisory and always fail silent. */ }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: polish-cn
|
|
3
3
|
description: "Polish the Chinese wording of a finished document or report, with a script proving every number, date, identifier, link and protected term is unchanged; prefers a Chinese model and records which ran. Use for '中文润色' or as a report skill's last step. NOT for cutting or restructuring content (editorial-review) or translating (write-doc)."
|
|
4
|
-
release-version: 0.
|
|
4
|
+
release-version: 0.39.0
|
|
5
5
|
---
|
|
6
6
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
7
7
|
# Polish Chinese
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: reg-parser
|
|
3
3
|
version: 1.1.0
|
|
4
4
|
description: "Parse regulatory/scheme documents into structured outputs: convert a regulation (AML, VARS, PCI-DSS, KYC, GDPR) into an audit-ready compliance checklist, or trace contract clauses to a mandate source. Suggest proactively when a regulation PDF accompanies a contract review or compliance task. NOT general summarization (doc-to-md), or writing the gap analysis or policy from the checklist (write-doc)."
|
|
5
|
-
release-version: 0.
|
|
5
|
+
release-version: 0.39.0
|
|
6
6
|
---
|
|
7
7
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
8
8
|
# reg-parser
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: terminology
|
|
3
3
|
description: "Build and keep a project's TERMINOLOGY.md: the preferred term per concept in English, 简体 and 繁體, and the terms to avoid. Use to set it up from the project's documents, when the user settles or corrects a term, or when another writing skill needs the format. NOT for writing documents (write-doc) or the code domain model (domain-modeling)."
|
|
4
|
-
release-version: 0.
|
|
4
|
+
release-version: 0.39.0
|
|
5
5
|
---
|
|
6
6
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
7
7
|
# Terminology
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: write-doc
|
|
3
3
|
description: "Write or edit a Markdown document in the project's house style, using the nearest WRITING.md and a document template (BRD, PRD, gap analysis, technical spec, integration guide, commercial proposal, compliance policy, risk operations procedure, or the project's own); English, Chinese or bilingual. NOT for learning a style from samples (distill-writing), audit reports from findings (report-writing), or WeChat articles (wechat-article-writer)."
|
|
4
|
-
release-version: 0.
|
|
4
|
+
release-version: 0.39.0
|
|
5
5
|
---
|
|
6
6
|
**Updates:** Once/session run `node <skill-base-dir>/release-check.mjs`.
|
|
7
7
|
# Write a document
|