@talesofai/neta-skills 0.6.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.
Files changed (140) hide show
  1. package/CHANGELOG.md +47 -0
  2. package/LICENSE +21 -0
  3. package/README.en.md +234 -0
  4. package/README.md +237 -0
  5. package/bin/apis/activity.js +14 -0
  6. package/bin/apis/artifact.js +64 -0
  7. package/bin/apis/audio.js +10 -0
  8. package/bin/apis/collection.js +87 -0
  9. package/bin/apis/config.js +49 -0
  10. package/bin/apis/feeds.js +34 -0
  11. package/bin/apis/gpt.js +10 -0
  12. package/bin/apis/hashtag.js +23 -0
  13. package/bin/apis/index.js +62 -0
  14. package/bin/apis/prompt.js +120 -0
  15. package/bin/apis/recsys.js +29 -0
  16. package/bin/apis/space.js +48 -0
  17. package/bin/apis/task.js +21 -0
  18. package/bin/apis/tcp.js +16 -0
  19. package/bin/apis/types.js +76 -0
  20. package/bin/apis/user.js +45 -0
  21. package/bin/apis/verse.js +18 -0
  22. package/bin/cli.js +16 -0
  23. package/bin/commands/community/create_comment.cmd.en_us.yml +4 -0
  24. package/bin/commands/community/create_comment.cmd.js +40 -0
  25. package/bin/commands/community/create_comment.cmd.zh_cn.yml +3 -0
  26. package/bin/commands/community/favor_collection.cmd.en_us.yml +4 -0
  27. package/bin/commands/community/favor_collection.cmd.js +29 -0
  28. package/bin/commands/community/favor_collection.cmd.zh_cn.yml +3 -0
  29. package/bin/commands/community/get_fan_list.cmd.en_us.yml +4 -0
  30. package/bin/commands/community/get_fan_list.cmd.js +36 -0
  31. package/bin/commands/community/get_fan_list.cmd.zh_cn.yml +3 -0
  32. package/bin/commands/community/get_hashtag_characters.cmd.en_us.yml +4 -0
  33. package/bin/commands/community/get_hashtag_characters.cmd.js +46 -0
  34. package/bin/commands/community/get_hashtag_characters.cmd.zh_cn.yml +3 -0
  35. package/bin/commands/community/get_hashtag_collections.cmd.en_us.yml +6 -0
  36. package/bin/commands/community/get_hashtag_collections.cmd.js +54 -0
  37. package/bin/commands/community/get_hashtag_collections.cmd.zh_cn.yml +5 -0
  38. package/bin/commands/community/get_hashtag_info.cmd.en_us.yml +4 -0
  39. package/bin/commands/community/get_hashtag_info.cmd.js +42 -0
  40. package/bin/commands/community/get_hashtag_info.cmd.zh_cn.yml +3 -0
  41. package/bin/commands/community/get_subscribe_list.cmd.en_us.yml +4 -0
  42. package/bin/commands/community/get_subscribe_list.cmd.js +36 -0
  43. package/bin/commands/community/get_subscribe_list.cmd.zh_cn.yml +3 -0
  44. package/bin/commands/community/like_collection.cmd.en_us.yml +4 -0
  45. package/bin/commands/community/like_collection.cmd.js +29 -0
  46. package/bin/commands/community/like_collection.cmd.zh_cn.yml +4 -0
  47. package/bin/commands/community/list_space_topics.cmd.en_us.yml +7 -0
  48. package/bin/commands/community/list_space_topics.cmd.js +39 -0
  49. package/bin/commands/community/list_space_topics.cmd.zh_cn.yml +6 -0
  50. package/bin/commands/community/list_spaces.cmd.en_us.yml +4 -0
  51. package/bin/commands/community/list_spaces.cmd.js +19 -0
  52. package/bin/commands/community/list_spaces.cmd.zh_cn.yml +3 -0
  53. package/bin/commands/community/read_collection.cmd.en_us.yml +4 -0
  54. package/bin/commands/community/read_collection.cmd.js +83 -0
  55. package/bin/commands/community/read_collection.cmd.zh_cn.yml +3 -0
  56. package/bin/commands/community/request_interactive_feed.cmd.en_us.yml +4 -0
  57. package/bin/commands/community/request_interactive_feed.cmd.js +54 -0
  58. package/bin/commands/community/request_interactive_feed.cmd.zh_cn.yml +5 -0
  59. package/bin/commands/community/subscribe_user.cmd.en_us.yml +4 -0
  60. package/bin/commands/community/subscribe_user.cmd.js +33 -0
  61. package/bin/commands/community/subscribe_user.cmd.zh_cn.yml +3 -0
  62. package/bin/commands/community/suggest_categories.cmd.en_us.yml +4 -0
  63. package/bin/commands/community/suggest_categories.cmd.js +26 -0
  64. package/bin/commands/community/suggest_categories.cmd.zh_cn.yml +3 -0
  65. package/bin/commands/community/suggest_content.cmd.en_us.yml +5 -0
  66. package/bin/commands/community/suggest_content.cmd.js +59 -0
  67. package/bin/commands/community/suggest_content.cmd.zh_cn.yml +4 -0
  68. package/bin/commands/community/suggest_keywords.cmd.en_us.yml +4 -0
  69. package/bin/commands/community/suggest_keywords.cmd.js +26 -0
  70. package/bin/commands/community/suggest_keywords.cmd.zh_cn.yml +3 -0
  71. package/bin/commands/community/suggest_tags.cmd.en_us.yml +4 -0
  72. package/bin/commands/community/suggest_tags.cmd.js +26 -0
  73. package/bin/commands/community/suggest_tags.cmd.zh_cn.yml +3 -0
  74. package/bin/commands/community/validate_tax_path.cmd.en_us.yml +4 -0
  75. package/bin/commands/community/validate_tax_path.cmd.js +24 -0
  76. package/bin/commands/community/validate_tax_path.cmd.zh_cn.yml +3 -0
  77. package/bin/commands/creative/edit_colleciton.cmd.en_us.yml +11 -0
  78. package/bin/commands/creative/edit_colleciton.cmd.js +140 -0
  79. package/bin/commands/creative/edit_colleciton.cmd.zh_cn.yml +10 -0
  80. package/bin/commands/creative/make_image.cmd.en_us.yml +20 -0
  81. package/bin/commands/creative/make_image.cmd.js +58 -0
  82. package/bin/commands/creative/make_image.cmd.zh_cn.yml +19 -0
  83. package/bin/commands/creative/make_song.cmd.en_us.yml +8 -0
  84. package/bin/commands/creative/make_song.cmd.js +53 -0
  85. package/bin/commands/creative/make_song.cmd.zh_cn.yml +7 -0
  86. package/bin/commands/creative/make_video.cmd.en_us.yml +17 -0
  87. package/bin/commands/creative/make_video.cmd.js +54 -0
  88. package/bin/commands/creative/make_video.cmd.zh_cn.yml +16 -0
  89. package/bin/commands/creative/publish_collection.cmd.en_us.yml +10 -0
  90. package/bin/commands/creative/publish_collection.cmd.js +101 -0
  91. package/bin/commands/creative/publish_collection.cmd.zh_cn.yml +9 -0
  92. package/bin/commands/creative/remove_background.cmd.en_us.yml +10 -0
  93. package/bin/commands/creative/remove_background.cmd.js +74 -0
  94. package/bin/commands/creative/remove_background.cmd.zh_cn.yml +9 -0
  95. package/bin/commands/creative/request_character_or_elementum.cmd.en_us.yml +23 -0
  96. package/bin/commands/creative/request_character_or_elementum.cmd.js +108 -0
  97. package/bin/commands/creative/request_character_or_elementum.cmd.zh_cn.yml +22 -0
  98. package/bin/commands/creative/search_tcp.cmd.en_us.yml +16 -0
  99. package/bin/commands/creative/search_tcp.cmd.js +53 -0
  100. package/bin/commands/creative/search_tcp.cmd.zh_cn.yml +15 -0
  101. package/bin/commands/factory.js +15 -0
  102. package/bin/commands/load.js +157 -0
  103. package/bin/utils/errors.js +61 -0
  104. package/bin/utils/json.js +8 -0
  105. package/bin/utils/lang.js +8 -0
  106. package/bin/utils/parse_meta.js +16 -0
  107. package/bin/utils/polling.js +17 -0
  108. package/bin/utils/prompts.js +186 -0
  109. package/package.json +77 -0
  110. package/skills/neta/SKILL.md +119 -0
  111. package/skills/neta-community/SKILL.md +123 -0
  112. package/skills/neta-creative/SKILL.md +118 -0
  113. package/skills/neta-space/SKILL.md +129 -0
  114. package/skills/neta-suggest/SKILL.md +490 -0
  115. package/skills/zh_cn/neta/SKILL.md +111 -0
  116. package/skills/zh_cn/neta/references/character-search.md +234 -0
  117. package/skills/zh_cn/neta/references/collection-remix.md +40 -0
  118. package/skills/zh_cn/neta/references/community-exploration.md +636 -0
  119. package/skills/zh_cn/neta/references/hashtag-research.md +295 -0
  120. package/skills/zh_cn/neta/references/image-generation.md +121 -0
  121. package/skills/zh_cn/neta/references/interactive-feed.md +377 -0
  122. package/skills/zh_cn/neta/references/social-interactive.md +73 -0
  123. package/skills/zh_cn/neta/references/song-creation.md +247 -0
  124. package/skills/zh_cn/neta/references/song-mv.md +198 -0
  125. package/skills/zh_cn/neta/references/space.md +90 -0
  126. package/skills/zh_cn/neta/references/video-generation.md +221 -0
  127. package/skills/zh_cn/neta-community/SKILL.md +109 -0
  128. package/skills/zh_cn/neta-community/references/character-search.md +233 -0
  129. package/skills/zh_cn/neta-community/references/hashtag-research.md +295 -0
  130. package/skills/zh_cn/neta-community/references/interactive-feed.md +377 -0
  131. package/skills/zh_cn/neta-community/references/social-interactive.md +73 -0
  132. package/skills/zh_cn/neta-creative/SKILL.md +105 -0
  133. package/skills/zh_cn/neta-creative/references/character-search.md +233 -0
  134. package/skills/zh_cn/neta-creative/references/collection-remix.md +40 -0
  135. package/skills/zh_cn/neta-creative/references/image-generation.md +121 -0
  136. package/skills/zh_cn/neta-creative/references/song-creation.md +247 -0
  137. package/skills/zh_cn/neta-creative/references/song-mv.md +198 -0
  138. package/skills/zh_cn/neta-creative/references/video-generation.md +221 -0
  139. package/skills/zh_cn/neta-space/SKILL.md +126 -0
  140. package/skills/zh_cn/neta-suggest/SKILL.md +662 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,47 @@
1
+ # @neta/skills-neta
2
+
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - i18n changes for commands
8
+
9
+ ## 0.5.0
10
+
11
+ ### Minor Changes
12
+
13
+ - README.en.md created to host the full English README, with cross-links between README.md and README.en.md.
14
+ skills/neta/SKILL.md now documents the new discovery-related commands (interactive feed and suggestion APIs) and fixes CLI examples.
15
+ collection-remix.md formatting improved for constraint bullets.
16
+ New reference docs community-exploration.md and interactive-feed.md describe best practices for discovery workflows and interactive feeds (currently written in Chinese but affect the doc surface).
17
+
18
+ Updated apis/index.ts and feeds.ts to wire in new recommendation / interactive endpoints.
19
+ Added recsys.ts (and built recsys.js) as the dedicated client for recommendation-system APIs backing suggest_content and related flows.
20
+ Extended commands/schema.ts (and built JS) so the schema reflects all newly added community / discovery commands.
21
+
22
+ Added a new set of community / discovery commands (both TypeScript source and built JS):
23
+ request_interactive_feed for interactive feed retrieval across homepage, collection relations, user profiles, and comment-thread children.
24
+ suggest_keywords for prefix-based keyword suggestions.
25
+ suggest_tags for keyword-based tag suggestions.
26
+ suggest_categories for hierarchical category navigation (levels 1–3).
27
+ validate_tax_path to check the validity of taxonomy paths.
28
+ suggest_content as a flexible content stream engine with recommend, search, and exact intents plus rich include/exclude filters.
29
+ Added / updated the corresponding localized command metadata files (\*.cmd.zh_cn.yml) and built JS handlers under skills/neta/bin/commands/community/.
30
+
31
+ ## 0.4.0
32
+
33
+ ### Minor Changes
34
+
35
+ - appends space commands
36
+
37
+ ## 0.3.0
38
+
39
+ ### Minor Changes
40
+
41
+ - add collection publish command
42
+
43
+ ## 0.2.0
44
+
45
+ ### Minor Changes
46
+
47
+ - structure refactor
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 TalesofAI Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.en.md ADDED
@@ -0,0 +1,234 @@
1
+ # NETA Skills
2
+
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
+ [![Node](https://img.shields.io/badge/Node-%3E%3D20-green)](https://nodejs.org/)
5
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue)](https://www.typescriptlang.org/)
6
+
7
+ [简体中文](./README.md) · [English](./README.en.md)
8
+
9
+ ---
10
+
11
+ ## English
12
+
13
+ ### Overview
14
+
15
+ **NETA Skills** is a collection of powerful AI agent skills and accompanying CLI tools designed for interacting with the [Neta Art](https://www.neta.art/) API. Built for developers and AI agents, it seamlessly extends any agent's capabilities to generate multimedia, manage characters, and process audio/video workflows.
16
+
17
+ You can get your access token from the [Neta Open Portal](https://www.neta.art/open/).
18
+
19
+ ---
20
+
21
+ ### ✨ Features
22
+
23
+ - 🎨 **Multimedia Creation:** Generate stunning images, videos, and songs using state-of-the-art AI models.
24
+ - 🔧 **Image & Video Processing:** Effortlessly remove backgrounds and merge video assets.
25
+ - 👤 **Character & Style Management:** Search, fetch details, and manage characters and stylistic elements.
26
+ - 🏷️ **Community Integrations:** Explore trending hashtags, popular characters, and curated collections.
27
+ - 🧭 **Smart Discovery & Suggestions:** Explore interactive feeds and get keyword, tag, and category suggestions for progressive content discovery.
28
+ - 🤖 **Agent First:** Designed from the ground up to plug into your favorite AI agent frameworks.
29
+
30
+ ---
31
+
32
+ ### 🚀 Getting Started with Skills
33
+
34
+ The primary way to use this project is by installing the skills into your AI agent environment.
35
+
36
+ #### Installation (skills.sh)
37
+
38
+ Install the unified [`neta`](skills/neta/SKILL.md) skill into your agent:
39
+
40
+ ```bash
41
+ npx skills add talesofai/neta-skills/skills/neta
42
+ ```
43
+
44
+ You can also install the specialized skills separately if your agent prefers more granular capabilities:
45
+
46
+ ```bash
47
+ # Community exploration (hashtags, spaces, interactive feed)
48
+ npx skills add talesofai/neta-skills/skills/neta-community
49
+
50
+ # Creation workflows (image / video / song)
51
+ npx skills add talesofai/neta-skills/skills/neta-creative
52
+
53
+ # Discovery & suggestions (keywords, tags, categories, content)
54
+ npx skills add talesofai/neta-skills/skills/neta-suggest
55
+
56
+ # Space navigation & exploration
57
+ npx skills add talesofai/neta-skills/skills/neta-space
58
+ ```
59
+
60
+ #### Available Commands
61
+
62
+ The skill includes **26 commands** for various tasks:
63
+
64
+ | Category | Command | Description |
65
+ |----------|---------|-------------|
66
+ | **Creation** | `make_image` | Generate images from text prompts |
67
+ | | `make_video` | Generate videos from images and prompts |
68
+ | | `make_song` | Compose songs with custom prompts and lyrics |
69
+ | | `remove_background` | Remove the background from an image |
70
+ | | `edit_collection` | Edit an existing collection (name, description, tags, status, etc.) |
71
+ | | `publish_collection` | Publish or update a collection |
72
+ | | `search_character_or_elementum` | Search reusable TCP building blocks (characters / elements / flows) |
73
+ | **Characters** | `request_character_or_elementum` | Fetch character or elementum details by name or UUID |
74
+ | **Community** | `get_hashtag_info` | Get details and lore for a specific hashtag |
75
+ | | `get_hashtag_characters` | Get a list of characters under a hashtag |
76
+ | | `get_hashtag_collections` | Get curated collections under a hashtag |
77
+ | | `read_collection` | Read details for a specific collection (玩法) |
78
+ | | `list_spaces` | List spaces that can be explored |
79
+ | | `list_space_topics` | List topics available under a specific space |
80
+ | | `request_interactive_feed` | Get interactive content feeds for collections, spaces, and users |
81
+ | | `suggest_keywords` | Get autocomplete suggestions for search keywords |
82
+ | | `suggest_tags` | Get recommended hashtags related to a keyword |
83
+ | | `suggest_categories` | Get navigation suggestions for taxonomy categories |
84
+ | | `validate_tax_path` | Validate that a taxonomy path is valid |
85
+ | | `suggest_content` | Discover content via recommend, search, or exact filter modes |
86
+ | | `get_fan_list` | Get the list of users who follow the current user |
87
+ | | `get_subscribe_list` | Get the list of creators the current user follows |
88
+ | | `favor_collection` | Favorite or unfavorite a collection |
89
+ | | `like_collection` | Like or unlike a collection |
90
+ | | `subscribe_user` | Follow or unfollow a creator |
91
+ | | `create_comment` | Create a comment on a collection |
92
+
93
+ ---
94
+
95
+ ### 🛠️ CLI Usage (`@talesofai/neta-cli`)
96
+
97
+ The project also ships a standalone CLI package `@talesofai/neta-cli` for testing, scripting, and CI automation.
98
+
99
+ #### Install CLI
100
+
101
+ ```bash
102
+ # Global install (recommended)
103
+ npm install -g @talesofai/neta-cli
104
+
105
+ # Or use npx / pnpm dlx without global install
106
+ npx @talesofai/neta-cli --help
107
+ pnpm dlx @talesofai/neta-cli --help
108
+ ```
109
+
110
+ Configure your environment:
111
+
112
+ ```bash
113
+ # Set NETA_TOKEN in your environment or put it into a .env / .env.local file
114
+ export NETA_TOKEN=your_token_here
115
+ ```
116
+
117
+ #### Running Commands
118
+
119
+ ```bash
120
+ # Get general help or specific command help
121
+ neta-cli --help
122
+ neta-cli make_image --help
123
+
124
+ # Example: Generate an image
125
+ neta-cli make_image --prompt "A cyberpunk cityscape at night" --aspect "16:9"
126
+
127
+ # Example: Search for characters or elementum
128
+ neta-cli search_character_or_elementum --keywords "fantasy"
129
+ ```
130
+
131
+ ---
132
+
133
+ ### 📂 Project Structure
134
+
135
+ ```text
136
+ neta-skills/
137
+ ├── skills/
138
+ │ ├── neta/ # Unified skill (agent-first, still maintained)
139
+ │ │ ├── SKILL.md # Skill documentation
140
+ │ │ ├── package.json # Dependencies
141
+ │ │ ├── src/ # Agent/skills implementation
142
+ │ │ └── references/ # Best practices & workflow guides (agent-oriented)
143
+ │ ├── neta-community/ # Community / hashtag / space exploration skill
144
+ │ ├── neta-creative/ # Image / video / song creation skill
145
+ │ ├── neta-suggest/ # Discovery & suggestion skill
146
+ │ └── neta-space/ # Space navigation & exploration skill
147
+ ├── packages/
148
+ │ └── neta-cli/ # Published CLI package (@talesofai/neta-cli)
149
+ │ ├── bin/ # Compiled JS CLI entry
150
+ │ ├── src/ # CLI-only source (commands, IO, etc.)
151
+ │ └── scripts/ # Build / post-build / validation scripts
152
+ ├── .env.example # Environment template
153
+ └── package.json # Root config
154
+ ```
155
+
156
+ ---
157
+
158
+ ### 📖 Best Practices & Workflows (References)
159
+
160
+ The `skills/neta/references/` directory contains detailed **best practice workflows**. These guides are designed to help AI agents (and developers) understand how to combine multiple commands to achieve complex goals effectively.
161
+
162
+ Agents use these references to learn the optimal sequence of actions, parameter tuning, and standard operating procedures for specific NETA Art workflows, such as:
163
+
164
+ - **Image & Video Generation:** Best practices for chaining prompts, generating assets, and assembling videos.
165
+ - **Song & MV Creation:** Workflows for composing songs and creating music videos with synchronized visuals.
166
+ - **Character & Hashtag Research:** Processes for finding trending content, searching characters, and utilizing community trends.
167
+
168
+ ---
169
+
170
+ ### 📝 Environment Variables
171
+
172
+ Both the AI agent skills and the CLI require the following environment configuration:
173
+
174
+ | Variable | Required | Default | Description |
175
+ |----------|----------|---------|-------------|
176
+ | `NETA_TOKEN` | ✅ | - | Your Neta Art API access token. |
177
+ | `NETA_API_BASE_URL` | ❌ | `zh_cn`: `https://api.talesofai.cn`; `en_us`: `https://api.talesofai.com` | Base URL for the Neta API. |
178
+
179
+ #### i18n and locale detection
180
+
181
+ The CLI and skills automatically detect the current locale and map it to internal language variants:
182
+
183
+ - Locales starting with `zh` (for example, `zh_CN`, `en_US`) → use `zh_cn` docs and metadata.
184
+ - All other locales → default to `en_us` docs and metadata.
185
+
186
+ In terminal environments, locale is typically controlled by:
187
+
188
+ - Your operating system language settings (macOS / Linux / Windows), and
189
+ - Environment variables such as `LC_ALL`, `LC_MESSAGES`, `LANG`, and `LANGUAGE`.
190
+
191
+ If you want to force a specific language for a single command, you can prefix it with the desired locale, for example:
192
+
193
+ ```bash
194
+ LC_ALL=zh_CN.UTF-8 neta-cli make_image --help
195
+ LANG=en_US.UTF-8 neta-cli make_image --help
196
+ ```
197
+
198
+ ---
199
+
200
+ ### 🔧 Development
201
+
202
+ To develop and test locally:
203
+
204
+ ```bash
205
+ # Install dependencies
206
+ corepack enabled
207
+ pnpm i
208
+
209
+ # Run TypeScript type checking
210
+ pnpm type-check
211
+
212
+ # Run lint
213
+ pnpm lint
214
+
215
+ # Test CLI commands locally
216
+ pnpm dev <command> [options]
217
+
218
+ # Build bin scripts
219
+ pnpm build
220
+ ```
221
+
222
+ ---
223
+
224
+ ### 📄 License
225
+
226
+ This project is open-sourced under the [MIT License](LICENSE).
227
+
228
+ ---
229
+
230
+ ### 🔗 Links
231
+
232
+ - [Neta Art Official Website](https://www.neta.art/)
233
+ - [skills.sh Documentation](https://skills.sh/docs)
234
+
package/README.md ADDED
@@ -0,0 +1,237 @@
1
+ # NETA Skills
2
+
3
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
+ [![Node](https://img.shields.io/badge/Node-%3E%3D20-green)](https://nodejs.org/)
5
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.7-blue)](https://www.typescriptlang.org/)
6
+
7
+ [简体中文](./README.md) · [English](./README.en.md)
8
+
9
+ ---
10
+
11
+ ## 简体中文
12
+
13
+ ### 简介
14
+
15
+ **NETA Skills** 是一组基于 [Neta Art](https://www.neta.art/) API 的 AI Agent 技能与 CLI 工具集合,帮助你在 Agent 环境中一站式完成:
16
+
17
+ - 生成图片 / 视频 / 歌曲等多媒体内容
18
+ - 查询与管理角色(Character)与风格元素(Elementum)
19
+ - 进行标签(Hashtag)与空间玩法探索
20
+ - 通过推荐引擎和互动 Feed 进行玩法内容发现
21
+
22
+ 你可以在 [Neta 开放平台](https://www.neta.art/open/) 获取访问令牌 `NETA_TOKEN`。
23
+ 也可以在[国内登陆账号后台](https://app.nieta.art/security) 获取访问令牌 `NETA_TOKEN`。
24
+
25
+ ---
26
+
27
+ ### ✨ 功能特性
28
+
29
+ - 🎨 **多媒体创作**:使用最新的 AI 模型生成图片、视频和歌曲。
30
+ - 🔧 **图像与视频处理**:支持移除背景、视频合并等常见素材处理流程。
31
+ - 👤 **角色与风格管理**:搜索、获取角色与风格元素详情,在创作中标准化复用。
32
+ - 🏷️ **社区与标签集成**:浏览热门标签、空间、玩法合集与角色。
33
+ - 🧭 **智能内容探索**:通过关键词建议、标签推荐、分类导航与智能内容流,渐进式发现玩法与内容。
34
+ - 🤖 **Agent 优先设计**:面向 AI Agent 场景设计,易于在各类 Agent 框架中集成调用。
35
+
36
+ ---
37
+
38
+ ### 🚀 在 Agent 中使用技能
39
+
40
+ 在你的 Agent 环境中安装统一的 [`neta`](skills/zh_cn/neta/SKILL.md) 技能:
41
+
42
+ ```bash
43
+ npx skills add talesofai/neta-skills/skills/zh_cn/neta
44
+ ```
45
+
46
+ 如果你希望在 Agent 中按功能模块更精细地控制权限,也可以分别安装拆分后的技能:
47
+
48
+ ```bash
49
+ # 社区 / 标签 / 空间探索
50
+ npx skills add talesofai/neta-skills/skills/zh_cn/neta-community
51
+
52
+ # 图片 / 视频 / 歌曲创作
53
+ npx skills add talesofai/neta-skills/skills/zh_cn/neta-creative
54
+
55
+ # 关键词 / 标签 / 分类 / 内容推荐与检索
56
+ npx skills add talesofai/neta-skills/skills/zh_cn/neta-suggest
57
+
58
+ # 空间导航与探索(space / topic)
59
+ npx skills add talesofai/neta-skills/skills/zh_cn/neta-space
60
+ ```
61
+
62
+ #### 可用指令总览
63
+
64
+ 当前技能共包含 **26 个命令**,覆盖创作、角色与社区探索等场景:
65
+
66
+ | 分类 | 命令 | 说明 |
67
+ |------|------|------|
68
+ | **创作 Creation** | `make_image` | 基于提示词生成图片 |
69
+ | | `make_video` | 基于图片与动作描述生成视频 |
70
+ | | `make_song` | 基于风格与歌词生成歌曲 |
71
+ | | `remove_background` | 移除图片背景 |
72
+ | | `edit_collection` | 编辑已有玩法合集(名称、描述、标签、状态等) |
73
+ | | `publish_collection` | 发布或更新玩法合集内容 |
74
+ | | `search_character_or_elementum` | 搜索可复用的 TCP(角色 / 元素 / 玩法模块) |
75
+ | **角色 Characters** | `request_character_or_elementum` | 通过名称或 UUID 获取角色 / 元素详情 |
76
+ | **社区 Community** | `get_hashtag_info` | 查询标签基础信息与 worldbuilding lore |
77
+ | | `get_hashtag_characters` | 获取标签下的角色列表 |
78
+ | | `get_hashtag_collections` | 获取标签下的玩法合集 |
79
+ | | `read_collection` | 读取单个玩法合集(含 Remix 模板) |
80
+ | | `list_spaces` | 列出可游览的空间 |
81
+ | | `list_space_topics` | 获取空间下的子空间(topic)信息 |
82
+ | | `request_interactive_feed` | 获取玩法互动 Feed(合集、空间、用户等场景) |
83
+ | | `suggest_keywords` | 获取搜索关键词自动补全建议 |
84
+ | | `suggest_tags` | 基于关键词获取相关标签建议 |
85
+ | | `suggest_categories` | 按层级获取玩法分类导航 |
86
+ | | `validate_tax_path` | 验证分类路径是否有效 |
87
+ | | `suggest_content` | 推荐 / 搜索 / 精确筛选三模式内容流 |
88
+ | | `get_fan_list` | 获取当前用户的粉丝列表 |
89
+ | | `get_subscribe_list` | 获取当前用户关注的创作者列表 |
90
+ | | `favor_collection` | 收藏 / 取消收藏玩法合集 |
91
+ | | `like_collection` | 点赞 / 取消点赞玩法合集 |
92
+ | | `subscribe_user` | 关注 / 取消关注创作者 |
93
+ | | `create_comment` | 对玩法合集创建评论 |
94
+
95
+ 更详细的中文 CLI 示例与最佳实践,请参考 `skills/neta/SKILL.md` 以及 `skills/neta/references/` 目录下的文档。
96
+
97
+ ---
98
+
99
+ ### 🛠️ CLI 使用(`@talesofai/neta-cli`)
100
+
101
+ 项目同时提供了一个独立的 CLI 包 `@talesofai/neta-cli`,适合在本地终端、脚本和 CI 中直接调用 Neta API。
102
+
103
+ #### 安装 CLI
104
+
105
+ ```bash
106
+ # 全局安装(推荐)
107
+ npm install -g @talesofai/neta-cli
108
+
109
+ # 或者使用 npx / pnpm dlx 临时调用
110
+ npx @talesofai/neta-cli --help
111
+ pnpm dlx @talesofai/neta-cli --help
112
+ ```
113
+
114
+ 配置环境变量:
115
+
116
+ ```bash
117
+ # 在环境中设置 NETA_TOKEN,或在你的 .env / .env.local 中配置
118
+ export NETA_TOKEN=your_token_here
119
+ ```
120
+
121
+ #### 运行示例
122
+
123
+ ```bash
124
+ # 查看帮助
125
+ neta-cli --help
126
+ neta-cli make_image --help
127
+
128
+ # 示例:生成一张图片
129
+ neta-cli make_image \
130
+ --prompt "夜晚的赛博朋克城市,霓虹灯,高楼大厦,雨中街道" \
131
+ --aspect "16:9"
132
+
133
+ # 示例:搜索角色或元素
134
+ neta-cli search_character_or_elementum \
135
+ --keywords "幻想" \
136
+ --parent_type "character"
137
+ ```
138
+
139
+ ---
140
+
141
+ ### 📂 项目结构
142
+
143
+ ```text
144
+ neta-skills/
145
+ ├── skills/
146
+ │ ├── neta/ # 统一 Neta 技能(Agent 优先,仍然维护)
147
+ │ │ ├── SKILL.md # 技能说明与中文用法示例
148
+ │ │ ├── package.json # 子包依赖配置
149
+ │ │ ├── src/ # Agent / skills 实现
150
+ │ │ └── references/ # 最佳实践与工作流参考文档(面向 Agent)
151
+ │ ├── neta-community/ # 社区 / 标签 / 空间探索相关技能
152
+ │ ├── neta-creative/ # 图片 / 视频 / 歌曲等创作相关技能
153
+ │ ├── neta-suggest/ # 推荐 / 搜索 / 分类导航等探索技能
154
+ │ └── neta-space/ # 空间与话题导航 / 探索技能
155
+ ├── packages/
156
+ │ └── neta-cli/ # CLI 包(发布名:@talesofai/neta-cli)
157
+ │ ├── bin/ # CLI 入口构建产物
158
+ │ ├── src/ # 仅 CLI 相关的源码(命令、IO 等)
159
+ │ └── scripts/ # 构建 / 发布 / 校验脚本
160
+ ├── .env.example # 环境变量示例
161
+ └── package.json # 根包配置
162
+ ```
163
+
164
+ ---
165
+
166
+ ### 📖 最佳实践与工作流参考
167
+
168
+ `skills/neta/references/` 目录下提供了详细的中文工作流与 SOP,适合 AI Agent 在规划调用顺序时阅读,例如:
169
+
170
+ - **图片与视频生成**:提示词结构、宽高比选择、从图到视频的完整链路。
171
+ - **歌曲与 MV 创作**:歌词模板、风格设计、MV 视觉规划与多场景组合。
172
+ - **角色与标签调研**:如何通过角色 / 标签 / 空间找到合适的创作方向。
173
+ - **玩法内容探索**:使用 `suggest_*` 与 `suggest_content` 构建渐进式探索闭环。
174
+
175
+ ---
176
+
177
+ ### 📝 环境变量
178
+
179
+ 无论在 Agent 还是 CLI 中使用,都需要正确配置以下环境变量:
180
+
181
+ | 变量名 | 必需 | 默认值 | 说明 |
182
+ |--------|------|--------|------|
183
+ | `NETA_TOKEN` | ✅ | - | Neta Art API 访问令牌 |
184
+ | `NETA_API_BASE_URL` | ❌ | zh_cn: `https://api.talesofai.cn`;en_us: `https://api.talesofai.com` | Neta API 网关地址 |
185
+
186
+ #### 多语言与本地化(i18n)
187
+
188
+ CLI 与 Skills 会根据系统与环境变量自动选择使用的语言:
189
+
190
+ - 系统语言或环境变量以 `zh` 开头(如 `zh_CN`、`en_US`)→ 使用 `zh_cn` 文案与元数据;
191
+ - 其他语言环境 → 默认使用 `en_us` 文案与元数据。
192
+
193
+ 在终端环境中,可以通过以下方式影响语言选择:
194
+
195
+ - 操作系统语言设置(macOS / Linux / Windows);
196
+ - Shell 中的本地化环境变量:`LC_ALL`、`LC_MESSAGES`、`LANG`、`LANGUAGE` 等。
197
+
198
+ 在需要强制指定语言时,推荐在运行命令前显式设置环境变量,例如:
199
+
200
+ ```bash
201
+ LC_ALL=zh_CN.UTF-8 neta-cli make_image --help
202
+ LANG=en_US.UTF-8 neta-cli make_image --help
203
+ ```
204
+
205
+ ---
206
+
207
+ ### 🔧 本地开发
208
+
209
+ 在本地开发与调试时,可以使用以下脚本:
210
+
211
+ ```bash
212
+ # 安装依赖
213
+ corepack enabled
214
+ pnpm i
215
+
216
+ # TypeScript 类型检查
217
+ pnpm type-check
218
+
219
+ # 代码检查(lint)
220
+ pnpm lint
221
+
222
+ # 本地调试技能(watch / dev)
223
+ pnpm dev <command> [options]
224
+
225
+ # 构建 bin 脚本
226
+ pnpm build
227
+ ```
228
+
229
+ ---
230
+
231
+ ### 📄 开源协议与链接
232
+
233
+ 本项目基于 [MIT License](LICENSE) 开源。
234
+
235
+ - [Neta Art 官网](https://www.neta.art/)
236
+ - [skills.sh 文档](https://skills.sh/docs)
237
+
@@ -0,0 +1,14 @@
1
+ export const createActivityApis = (client) => {
2
+ const fetchSelectedCollections = async (activityUuid, params, config) => {
3
+ const url = `/v1/activities/${encodeURIComponent(activityUuid)}/selected-stories/highlights`;
4
+ return client
5
+ .get(url, {
6
+ ...config,
7
+ params,
8
+ })
9
+ .then((res) => res.data);
10
+ };
11
+ return {
12
+ fetchSelectedCollections,
13
+ };
14
+ };
@@ -0,0 +1,64 @@
1
+ export const createArtifactApis = (client) => {
2
+ const makeImage = async (payload, config) => {
3
+ return client
4
+ .post("/v3/make_image", payload, config)
5
+ .then((res) => res.data);
6
+ };
7
+ const makeVideo = async (payload, config) => {
8
+ return client
9
+ .post("/v3/make_video", payload, config)
10
+ .then((res) => res.data);
11
+ };
12
+ const editImage = async (payload, config) => {
13
+ return client
14
+ .post("/v1/image_edit_v1/task", payload, config)
15
+ .then((res) => res.data);
16
+ };
17
+ const task = async (task_uuid, config) => {
18
+ return client
19
+ .get(`/v1/artifact/task/${task_uuid}`, config)
20
+ .then((res) => res.data);
21
+ };
22
+ const mergeMedia = async (payload, config) => {
23
+ return client
24
+ .post("/v3/merge_media/v3/submit_task", payload, config)
25
+ .then((res) => res.data);
26
+ };
27
+ const makeSong = async (prompt, lyrics, meta, config) => {
28
+ return client
29
+ .post("/v3/make_song", {
30
+ prompt,
31
+ lyrics,
32
+ meta,
33
+ }, config)
34
+ .then((res) => res.data);
35
+ };
36
+ const postProcess = async (uuid, preset, meta, config) => {
37
+ return client
38
+ .post("/v3/make_face_detailer", {
39
+ source_artifact_uuid: uuid,
40
+ preset_key: preset,
41
+ meta,
42
+ }, config)
43
+ .then((res) => res.data);
44
+ };
45
+ const artifactDetail = async (uuids) => {
46
+ return client
47
+ .get("/v1/artifact/artifact-detail", {
48
+ params: {
49
+ uuids: uuids.join(","),
50
+ },
51
+ })
52
+ .then((res) => res.data);
53
+ };
54
+ return {
55
+ makeImage,
56
+ makeVideo,
57
+ editImage,
58
+ makeSong,
59
+ mergeMedia,
60
+ postProcess,
61
+ task,
62
+ artifactDetail,
63
+ };
64
+ };
@@ -0,0 +1,10 @@
1
+ export const createAudioApis = (client) => {
2
+ const verseAudioPresets = async () => {
3
+ return client
4
+ .get("/v1/ai_director_audio_preset")
5
+ .then((res) => res.data);
6
+ };
7
+ return {
8
+ verseAudioPresets,
9
+ };
10
+ };