@tycoworks/tycoslide 0.13.0 → 0.13.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/README.md +1 -1
- package/SKILL.md +3 -3
- package/dist/cli.js +3 -3
- package/dist/skillZip.d.ts +2 -2
- package/dist/skillZip.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ my-theme/
|
|
|
68
68
|
assets/icons/
|
|
69
69
|
theme.json
|
|
70
70
|
package.json
|
|
71
|
-
|
|
71
|
+
SKILL.md # generated by `tycoslide package`
|
|
72
72
|
syntax.md # generated by `tycoslide package`
|
|
73
73
|
manifest.json # generated by `tycoslide package` -- the theme's layouts
|
|
74
74
|
assets.json # generated by `tycoslide package` -- the theme's picture catalog
|
package/SKILL.md
CHANGED
|
@@ -37,7 +37,7 @@ This skill builds on-brand decks from a markdown deck file. The theme provides s
|
|
|
37
37
|
|
|
38
38
|
Before writing anything, read `manifest.json`. It lists the theme's **layouts** -- for each: `name`, `description`, `parameters` (frontmatter inputs) and `slots` (body regions). A layout is identified by its `name`; every parameter and slot by its `key`. Parameters carry a `type`, slots carry `accepts`, and either may be `required`.
|
|
39
39
|
|
|
40
|
-
Pictures live in `assets.json`: every logo, illustration and icon the theme offers, keyed by category and name. **Search it, do not read it whole** -- an icon set alone can run to thousands of entries. Grep for the
|
|
40
|
+
Pictures live in `assets.json`: every logo, illustration and icon the theme offers, keyed by category and name. **Search it, do not read it whole** -- an icon set alone can run to thousands of entries. Grep for it and use the `$category.name` you find -- but **search for what the icon depicts, not what you mean by it**: a catalog is indexed by picture, so "freshness" finds nothing while `grep -i "clock" assets.json` and `grep -i "bolt"` find the icon you wanted.
|
|
41
41
|
|
|
42
42
|
A layout's inputs split two ways (see [syntax.md](syntax.md) for details):
|
|
43
43
|
- **parameters** -- one value on a frontmatter line. Fill by putting a value under the parameter's key in the slide frontmatter.
|
|
@@ -89,7 +89,7 @@ A deck file has three parts:
|
|
|
89
89
|
|
|
90
90
|
### Slide frontmatter
|
|
91
91
|
|
|
92
|
-
Every slide must have a `layout:` key. All other frontmatter keys map 1:1 to the layout's **parameters**.
|
|
92
|
+
Every slide must have a `layout:` key. All other frontmatter keys map 1:1 to the layout's **parameters**. A value containing a colon-then-space must be quoted -- `title: "The change: compute on the difference"` -- or YAML reads it as a second key and the build fails.
|
|
93
93
|
|
|
94
94
|
```yaml
|
|
95
95
|
---
|
|
@@ -141,7 +141,7 @@ Keep each slot's content to what its region comfortably holds. When content over
|
|
|
141
141
|
- **Don't repeat the same layout** -- vary layouts for visual rhythm
|
|
142
142
|
- **Don't overstuff a slot** -- keep content to what its region comfortably holds; split across slides when there's too much
|
|
143
143
|
- **Don't restyle the layout** -- the theme owns all design; you only fill slots
|
|
144
|
-
- **Don't use an image that's wrong for the slot** -- a small slot wants a simple icon, not a dense illustration. If you get a `shrunk to X%` warning, look at the rendered slide: if the image is now too small to make out, use a simpler one.
|
|
144
|
+
- **Don't use an image that's wrong for the slot** -- a small slot wants a simple icon, not a dense illustration. If you get a `shrunk to X%` warning, look at the rendered slide: if the image is now too small to make out, use a simpler one. A `leaves X% of the frame empty` warning is the opposite: the image is a different shape from the slot. Neither fails the build -- judge both from the rendered slide.
|
|
145
145
|
- **Don't invent layout or asset names** -- only use layouts from `manifest.json` and assets from `assets.json`
|
|
146
146
|
- **Don't leave required parameters or slots empty** -- and don't leave a placeholder logo or dummy text in an image slot you care about
|
|
147
147
|
|
package/dist/cli.js
CHANGED
|
@@ -8,9 +8,9 @@ import { compileDeck, loadThemeConfig, parseSlideDocument, RESERVED_KEY } from "
|
|
|
8
8
|
import { renameSkill, skillPackageJson, zipDir } from "./skillZip.js";
|
|
9
9
|
const DEFAULT_CONFIG = "theme.json";
|
|
10
10
|
const MANIFEST_FILE = "manifest.json";
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
const SKILL_FILE = "
|
|
11
|
+
// SKILL.md, uppercase: the Agent Skills format requires that exact filename at the
|
|
12
|
+
// root of a skill folder, and a case-sensitive filesystem will not find any other.
|
|
13
|
+
const SKILL_FILE = "SKILL.md";
|
|
14
14
|
const SYNTAX_FILE = "syntax.md";
|
|
15
15
|
const sdkDir = dirname(fileURLToPath(import.meta.url));
|
|
16
16
|
const skillMdPath = resolve(sdkDir, "..", "SKILL.md");
|
package/dist/skillZip.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CompilerThemeConfig } from "./markdown/types.js";
|
|
2
2
|
/**
|
|
3
|
-
* Rewrite the `name:` value in a
|
|
3
|
+
* Rewrite the `name:` value in a SKILL.md's leading YAML frontmatter so the
|
|
4
4
|
* packaged skill is named after the consuming theme, not the source template.
|
|
5
5
|
* Only the leading `---`…`---` block is touched; the body is left byte-for-byte.
|
|
6
6
|
* Throws if there is no frontmatter or no `name:` line — the caller names the file.
|
|
@@ -28,7 +28,7 @@ export declare function skillPackageJson(theme: Record<string, unknown>, engine:
|
|
|
28
28
|
* Zip a theme into an uploadable Agent Skill archive whose entries all live
|
|
29
29
|
* under a single root folder (e.g. `acme-slides/theme.json`), matching Anthropic's
|
|
30
30
|
* custom-skill format. `generated` names the files the caller just wrote (the
|
|
31
|
-
* config, manifest,
|
|
31
|
+
* config, manifest, SKILL.md, syntax.md); `packageJson` is the authored manifest
|
|
32
32
|
* from `skillPackageJson`. Optional support files are skipped when absent;
|
|
33
33
|
* anything the config declares but that is missing is an error.
|
|
34
34
|
*/
|
package/dist/skillZip.js
CHANGED
|
@@ -5,7 +5,7 @@ import { TEMPLATE_DIR } from "./engine/index.js";
|
|
|
5
5
|
const FRONTMATTER = /^---\n([\s\S]*?)\n---/;
|
|
6
6
|
const NAME_LINE = /^name:[ \t]*.*$/m;
|
|
7
7
|
/**
|
|
8
|
-
* Rewrite the `name:` value in a
|
|
8
|
+
* Rewrite the `name:` value in a SKILL.md's leading YAML frontmatter so the
|
|
9
9
|
* packaged skill is named after the consuming theme, not the source template.
|
|
10
10
|
* Only the leading `---`…`---` block is touched; the body is left byte-for-byte.
|
|
11
11
|
* Throws if there is no frontmatter or no `name:` line — the caller names the file.
|
|
@@ -13,9 +13,9 @@ const NAME_LINE = /^name:[ \t]*.*$/m;
|
|
|
13
13
|
export function renameSkill(md, name) {
|
|
14
14
|
const block = md.match(FRONTMATTER);
|
|
15
15
|
if (!block)
|
|
16
|
-
throw new Error("
|
|
16
|
+
throw new Error("SKILL.md has no YAML frontmatter block");
|
|
17
17
|
if (!NAME_LINE.test(block[1]))
|
|
18
|
-
throw new Error('
|
|
18
|
+
throw new Error('SKILL.md frontmatter has no "name:" line');
|
|
19
19
|
return md.replace(block[0], block[0].replace(NAME_LINE, `name: ${name}`));
|
|
20
20
|
}
|
|
21
21
|
/** The manifest a packaged skill installs from, authored rather than copied. */
|
|
@@ -71,7 +71,7 @@ function skillPaths(config, generated) {
|
|
|
71
71
|
* Zip a theme into an uploadable Agent Skill archive whose entries all live
|
|
72
72
|
* under a single root folder (e.g. `acme-slides/theme.json`), matching Anthropic's
|
|
73
73
|
* custom-skill format. `generated` names the files the caller just wrote (the
|
|
74
|
-
* config, manifest,
|
|
74
|
+
* config, manifest, SKILL.md, syntax.md); `packageJson` is the authored manifest
|
|
75
75
|
* from `skillPackageJson`. Optional support files are skipped when absent;
|
|
76
76
|
* anything the config declares but that is missing is an error.
|
|
77
77
|
*/
|