git clone --depth 1 https://github.com/dtyq/magic /tmp/self-media-composer && cp -r /tmp/self-media-composer/backend/super-magic/agents/skills/self-media-composer ~/.claude/skills/self-media-composerSKILL.md
# Self-Media Composer Skill
Complete capability for building and managing self-media projects. One project groups many posts; each post is an independent folder with its own meta and card sequence. This skill scaffolds that structure, authors the cards, generates reference engagement data, and keeps the root index in sync.
---
## When to Load This Skill
Load this skill **immediately and before any other action** when the user's message matches any of the following patterns.
### English
| User says | Load reason |
| --- | --- |
| "create a post" / "add a post" | New post creation |
| "make cards for Rednote / Instagram" | Card-based post authoring |
| "write a WeChat article" / "WeChat official account post" | Article post authoring |
| "build a self-media project" / "start a content project" | Project scaffolding |
| "generate social cards" / "design card images" | Card design |
| "create content for [platform]" | Any platform post |
| "post-publication review" / "article ops review" | Operations data sync |
| "fetch published data" / "update ops files" | Operations data sync |
| "sync now" / "real data refresh" | Operations data sync |
| Contains `[@self_media_project:...]` | Existing project reference |
### Multilingual
Load for equivalent requests in any user language, including Chinese-language requests for Xiaohongshu/Rednote posts, WeChat Official Account articles, Instagram cards, card-based social posts, content projects, publishing-data import, immediate sync, real data refresh, operations review, or any message containing `[@self_media_project:...]`.
> **Note:** When localized platform aliases appear, treat them as the corresponding platform values. See Platform Aliases in the Platform Defaults section.
---
## Execution
All Python snippets in this document must run through `run_sdk_snippet`:
```python
run_sdk_snippet(
python_code="""
from sdk.tool import tool
result = tool.call('create_self_media_project', {
'project_path': 'ai-monthly',
'platform': 'rednote'
})
print(result)
"""
)
```
`result` exposes `result.ok`, `result.content`, `result.data`. Access structured data via `result.data`; the object is not subscriptable.
---
## Output Language Contract
The skill documentation is written in English, but generated content must adapt to the user's language.
1. Infer the user's preferred output language from the current user message first, then from active draft content, existing post language, project context, and explicit platform requirements. If the target language is still ambiguous and the choice affects the final content, ask one concise clarification.
2. Write all user-facing text in the inferred language: questions, option labels, project/post display names, titles, subtitles, card copy, article prose, captions, comments, CTA text, placeholder labels, relative time strings, operations review prose, and template descriptions.
3. Keep machine contracts stable: platform values, preset IDs, JSON keys, enum values, CSS class names, JS namespaces, file extensions, and API/tool parameters stay in their documented form.
4. Use safe filesystem IDs. Prefer lowercase ASCII slugs for `project_path`, `post_id`, card filenames, and preset names unless the user explicitly needs localized filenames and the path is safe.
5. Do not translate brand names, platform names, product names, source quotes, code identifiers, or fixed schema values. Translate surrounding explanation and content intent.
6. For Rednote tags, choose tags that fit the user's output language and the platform's search behavior. The Chinese hashtag library is a reference set for Chinese/Xiaohongshu SEO, not a command to force Chinese tags in non-Chinese output.
7. Set HTML `lang` attributes to the inferred language when writing cards or articles (`zh-CN`, `en`, `ja`, etc.).
---
## Project Concept
A self-media project is a Magic Project folder whose `magic.project.js` declares `type: "self-media"`. It contains:
- `magic.project.js` at the root — JSONP, holds a per-platform posts index
- `posts/<post-id>/` — one folder per post, fully self-contained
- `shared/` — optional, assets shared across posts (including copied preset bundles)
Directory layout:
```
<project-root>/
├── magic.project.js
├── posts/
│ ├── <post-id>/
│ │ ├── post.json
│ │ ├── cards/ # rednote / instagram only
│ │ │ ├── <card>.html
│ │ │ └── ...
│ │ └── assets/
│ ├── <wechat-post-id>/ # wechat-official-accounts
│ │ ├── post.json
│ │ ├── <article>.html # single article HTML
│ │ └── assets/
│ │ ├── cover-hero.jpg
│ │ └── cover-square.jpg
│ └── ...
└── shared/
└── presets/
└── <preset-name>/
├── <preset-name>.css
└── <preset-name>.js
```
Preset source files (inside this skill) are organized by platform:
```
presets/
├── rednote/
│ ├── neo-brutalism/
│ ├── code-dispatch/
│ ├── dark-tech/
│ ├── gradient-editorial/
│ ├── personal-insight/
│ ├── film-vintage/
│ ├── warm-journal/
│ ├── paper-column/
│ ├── signal-grid/
│ └── product-launch-preset/
├── instagram/
│ ├── ins-modern/
│ ├── ins-minimal/
│ ├── ins-dark/
│ ├── ins-retro/
│ ├── ins-fluent-depth/
│ ├── ins-token-system/
│ ├── ins-creator-studio/
│ ├── ins-film-frame/
│ ├── ins-warm-journal/
│ └── ins-signal-grid/
└── wechat-official-accounts/
└── (coming soon)
```
> For `magic.project.js` and `post.json` format examples, path rules, and file authoring rules, see [references/file-formats.md](./references/file-formats.md).
### File authoring rules (summary)
- `magic.project.js` must be generated by `create_self_media_project`. Never create or overwrite it with `write_file`. Edit its inner `posts` array via `edit_file` only.
- `post.json` is produced by `create_self_media_post`. Edit it with `edit_file` for subsequent changes.
- Card HTML files can be authored directly with `write_file`.
---
## Platform Defaults
CurreCore canvas design skill covering project management, multimedia principles, AI image generation, web image search, and design marker processing. Load for any canvas design task. CRITICAL - When user message contains [@design_canvas_project:...] or [@design_marker:...] mentions, or when the user wants to generate video/animation/clip on a canvas project, you MUST load this skill first before any operations.
Summarize and compress the current conversation history into a structured context snapshot, then call compact_chat_history to save it. Read this skill only when the user explicitly asks to compact/summarize — system-triggered compaction injects the instructions directly without requiring a skill read.
Slide/PPT creation skill that provides complete slide creation, editing, and management capabilities. Use when users need to create slides, make presentations, edit slide content, or manage slide projects. CRITICAL - When user message contains [@slide_project:...] mention, you MUST load this skill first before any operations.
|
|
Data analysis dashboard (instrument panel) development skill. Use when users need to develop data dashboards, create/edit Dashboard projects, build large-screen data boards, or perform dashboard data cleaning. Includes dashboard project creation, card plan, data cleaning (data_cleaning.py), card management tools (create_dashboard_cards, update_dashboard_cards, delete_dashboard_cards, query_dashboard_cards), map download tool (download_dashboard_maps), dashboard development, and validation.
Use when the user wants to interact with DingTalk in any way — including but not limited to: reading, querying, searching, sending, replying to, forwarding, or recalling DingTalk chat messages and chat history; managing group chats and conversations; sending DING alerts; querying contacts, org structure, AI search, or coworkers; reading, searching, creating, or editing DingTalk docs, drive files, sheets, AI tables, wiki, mail, calendar events, meeting rooms, AI meeting minutes, attendance, OA approvals, todos, reports/logs, live sessions, AI apps, permissions, or open-platform docs.