dtyq/magic/ai-card-generator
Claude Code and agent skill by dtyq/magic
- community
- ext:[{"type":"template","description":"Custom templates for code generation"}]
Checking that the SKILL.md file is still in the repository.
Generate AI Cards — HTML visual pages (single-file or folder-based multi-file) for scheduled automated reports. Use when: user wants to create a recurring visual card, hotspot tracker, daily digest, analytics panel, inspiration page, or any HTML-based automated visualization that updates on schedule. Trigger signals: AI card, inspiration card, generated card, visual report, hotspot tracker, daily digest, dashboard card, scheduled visualization, and equivalent requests in any user language. Skip…
Install
npx vskill@latest install dtyq/magic/ai-card-generatorSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as dtyq/magic/ai-card-generator.
AI Card Generator
Automatically generate and update HTML visual cards via scheduled tasks. Cards can be single-file or folder-based multi-file, and are generated from user prompts + templates with fresh data.
Output Language Contract
The skill documentation, built-in templates, and prompt snippets are written in English. Generated card content must adapt to the user's language.
- Infer the user's preferred output language from the current request first, then from existing card content, template language, project context, and explicit user instructions. Ask one concise clarification only when language choice materially changes the final card.
- Write all user-facing generated text in the inferred language: card titles, descriptions, summaries, labels, badges, source notes, chart labels, AI follow-up prompts, status messages, placeholders, and schedule-created card metadata.
- Keep machine contracts stable:
magic.project.jskeys, enum-like status values, paths, filenames, CSS class names, DOM ids, JS function names, Magic API calls, and template marker comments stay in their documented form. - Set HTML
langattributes to the inferred language for generated cards. Built-in English templates may uselang="en", but cards generated for users should update it. - Do not translate brand names, product names, code identifiers, URLs, source quotes, or fixed schema values. Translate surrounding explanation and presentation text.
Core Capabilities
- Create AI visual cards with scheduled updates
- Support user-customizable HTML templates (users can edit templates anytime)
- Each execution generates updated content based on template structure + latest data
- Automatic history version snapshot management
- Support multiple card types (hotspot tracker, daily digest, analytics panel, etc.)
- Design scenario-specific interactive templates instead of only filling the preset skeletons
- Preserve source links from fetched data and expose them through source lists, new-tab links, or safe iframe previews
Related Skill Usage
When a card needs interactivity, web-page previews, file I/O, agent/model selectors, or AI deep-analysis actions, read and apply these skills first:
html-app-architect: decompose the user's request, decide interaction/data/Agent boundaries, and choose Simple/Medium/Complex architecture for ordinary HTML projects.html-api-sdk: verify exactwindow.Magic.*API signatures, message formats, error handling, and fallback behavior.
Do not treat an AI Card as a static screenshot. It is an updateable HTML micro-page: the template owns the interaction and visual structure, while the scheduled Agent workflow owns data fetching, source tracking, and content replacement.
Directory Structure Convention
Card directory name is user-defined, no fixed path required. The core requirement is the directory must contain magic.project.js with type set to ai-card.
Preferred mode is folder-based multi-file for maintainability. Single-file mode is still supported for backward compatibility.
Creation Workflow
Step 0: Requirement Decomposition and Template Design
Before creating or modifying a card, decompose the user's request into: information type, data sources, update cadence, expected interactions, source-link display mode, and whether Agent deep analysis is needed.
Design the template for the scenario instead of mechanically applying the three presets:
- Hotspot / public-opinion cards: ranking, trend lines, platform distribution, sentiment/risk, lifecycle, source preview.
- Daily / weekly digest cards: executive summary, metric groups, event timeline, action list, citations, expandable source text.
- Analytics dashboards: KPIs, funnels, cohorts, anomaly alerts, range switching, follow-up insight prompts.
- Research / intelligence cards: claim cards, evidence matrix, source reliability, iframe source preview, comparison view.
- Decision / planning cards: option comparison, risk/reward, milestones, owners, next actions.
Prefer interactions that help judgment and action: filters, tabs, sorting, expand/collapse, chart hover, time-range switches, source drawers, iframe previews, and AI follow-up buttons. Avoid decorative-only interactions.
Self-Media Operations Boundary
When the prompt is for a self-media article/post review, post-publication retrospective, published-data import, operations review dashboard, article operations dashboard, or localized equivalent, do not generate or update ops/* files in this skill. Route the work to self-media-composer or the self-media/IP-operations data-sync workflow, which owns ops/source.json, ops/metrics.json, ops/comments.json, and ops/review.html.
AI Card may read already-produced self-media operation files only when the user explicitly asks for a separate visual card based on those existing files. It must not create, overwrite, backfill, or pretend to fetch self-media operation data.
Step 1: Create Card Directory Structure
Based on user requirements, create directory and write all required files:
Step 2: magic.project.js Format
Must follow this format strictly — both frontend and backend depend on it for type recognition:
If the creation message includes a card id and card link, copy both values into magic.project.js as card_id and card_path_or_link. The frontend owns URL generation. This skill stores and uses the provided URL; it must not guess the frontend domain or route base.
Creation messages may provide these values as friendly text instead of raw JSON:
Field rules:
卡片编号is the stable frontend deep-link identifier for this AI Card. Write it to top-levelmagic.project.js.card_id.卡片链接is the full frontend URL that opens the topic and targets this card. Write it to top-levelmagic.project.js.card_path_or_link.- Do not require the creation message to explain why these fields exist or to use JSON. This skill owns the mapping and usage rules.
- Use
card_path_or_linkin notification content when present.
Creation messages intentionally keep execution details concise. Treat sections such as 创建需求, 创建位置, 模板, 更新方式, 定时, and 分析指令 as inputs. Apply this skill's Creation Workflow, Template Specification, Scheduled Update Workflow, and Notification Dispatch rules to decide the actual file structure, template behavior, scheduled task setup, and update process. Do not require the message itself to repeat these execution steps.
Notification Dispatch
AI Cards can optionally deliver a short update notice after a card is created or refreshed. The v1 configuration only stores notification channel and target description. Do not ask the frontend or user to provide platform credentials, webhook secrets, SMTP settings, message templates, target IDs, or channel-specific delivery options in magic.project.js.
Supported shape:
Rules:
- Treat missing
notification, missingchannels, or an emptychannelsarray as notification disabled. - Supported
channelvalues aredingtalk,wecom, andlarkonly. Ignore unknown channels and explain the skipped channel in the current topic. targetDescriptionis natural-language user intent. It may describe a person, group, chat, or another platform-specific target. Do not invent a target when it is ambiguous.- Send notifications only after the card output has been written successfully, history has been archived when needed, and
magic.project.jshas been updated. - For
dingtalk, loaddingtalk-cliand use its normal routing and authentication flow to resolve and send the message. - For
wecom, guide the user to configure a WeCom group bot webhook outsidemagic.project.js; after the webhook is configured, the next card update can use the configured webhook delivery path. - For
lark, loadlark-cliand use its normal routing and authentication flow to resolve and send the message. - Do not put channel routing rules, skill names, credentials, or fallback execution details into the scheduled task message. The scheduled task should instruct the agent to update the card; this skill owns notification behavior.
- If authentication, webhook configuration, target resolution, or delivery fails, report the concrete missing information in the current topic. Do not claim the notification was sent.
Recommended notification content:
Step 3: Template Specification (template/index.html or template.html)
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingbackend/super-magic/agents/skills/ai-card-generator/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Extension points
templateCustom templates for code generation
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/dtyq/magic/ai-card-generator)