Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计提醒

codeacodea 搜索

Agent Skill

codea 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

196

周安装

8

GitHub Stars

公开资料未说明

下载量

63
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:codea(codea 搜索)
来源仓库:https://github.com/twolivesleft/codea-agent-skill
仓库路径:skills/codea
安装命令:
npx skills add https://github.com/twolivesleft/codea-agent-skill --skill codea
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/twolivesleft/codea-agent-skill --skill codea

简介

用于连接 iOS/iPadOS/macOS 设备的 Codea 项目。

  • 支持项目发现、配置管理与脚本化交互操作。
  • 可通过环境变量或配置文件指定设备地址端口。
  • 适用于自动化测试与远程开发场景集成。codea 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 安装方式:github,通过 npx skills add 命令添加指定仓库技能。

SKILL.md

Codea Skill

This directory contains the codea CLI tool for working with Codea projects on a connected iOS, iPadOS, or macOS device.

Setup

pip install -e .
codea discover        # find device on local network and save config

Or configure manually:

codea configure --host 192.168.1.42 --port 18513

Or via environment variables (useful in CI or when config file isn't set up):

export CODEA_HOST=192.168.1.42
export CODEA_PORT=18513

Project Naming

Projects are identified as Collection/Project (e.g. Documents/Morse) or just Project if the name is unique across all collections. iCloud projects use iCloud/Collection/Project.

codea pull "Morse"                  # unique name, works as-is
codea pull "Documents/Morse"        # explicit local collection
codea pull "iCloud/Documents/Foo"   # iCloud project

Typical Agent Workflow

Always disable the idle timer at the start of a session so the device screen stays awake:

codea idle-timer off

Editing an existing project

# 1. Pull a project and all its dependencies
codea pull "My Game"
# Files land in ./My Game/ and ./My Game/Dependencies/<name>/

# 2. Read and edit files (use standard file tools)

# 3. Push only the modified files (prefer this over pushing the entire project)
codea push "My Game" Main.lua Player.lua
# Push entire project only if you don't know which files changed
codea push "My Game"

# 4. Start log monitoring, then run
codea clear-logs
codea logs --follow >> /tmp/codea.log &
codea run "My Game"
sleep 3
codea screenshot --output result.png

# 5. Execute Lua to inspect state
codea exec "print(health)"

# 6. Check logs
cat /tmp/codea.log

# 7. Iterate (push changes, restart, check logs again)
codea push "My Game" Main.lua
codea restart
sleep 2
cat /tmp/codea.log

Creating a new project

# 1. Create the project on the device
codea new "My Game"
codea new "My Game" --collection Documents   # explicit collection
codea new "My Game" --cloud                  # iCloud
codea new "My Game" --template Modern        # use Modern (Carbide) template — also sets the runtime to modern; no need to run `codea runtime` separately

# 2. Pull it locally — gets the default template files (Main.lua etc.)
codea pull "My Game"

# 3. Edit files locally (use standard file tools)

# 4. Push back and run
codea push "My Game"
codea run "My Game"
sleep 3
codea screenshot --output result.png

Global Flag: --wait

codea --wait <command>

Blocks until Codea's Air Code server responds, then runs the command. Use this whenever the user may have Codea backgrounded on their device (e.g. they are chatting with you from another app). The CLI will poll silently and report how long it waited.

codea --wait ls
codea --wait run "My Game"

Always prefer --wait over asking the user to manually switch to Codea first.

Commands

Device

CommandDescription
codea discoverScan network for Codea devices, save config
codea configureManually set device host/port
codea statusShow current device config and live state

Collections

CommandDescription
codea collections lsList all collections
codea collections new <name>Create a new local collection
codea collections delete <name>Delete a collection (prompts for confirmation)

Projects

CommandDescription
codea lsList all projects as Collection/Project
codea new <name>Create a new project (see naming above); --template <name> selects a template (e.g. Default, Modern)
codea rename <project> <newname>Rename a project
codea move <project> <collection>Move a project to a different collection
codea delete <project>Delete a project (prompts for confirmation)
codea runtime <project>Get the runtime type (legacy or modern)
codea runtime <project> <type>Set the runtime type (legacy or modern)

Templates

CommandDescription
codea templates lsList all templates (built-in and custom)
codea templates add <project>Copy a project into the custom templates collection; --name <name> to rename
codea templates remove <name>Remove a custom template (prompts for confirmation)

Custom templates live in the Templates collection and appear in codea ls as Templates/<name>. They can be edited like any project — use codea pull "Templates/My Template" to pull locally, edit files, then codea push "Templates/My Template" to update the template.

Files

CommandDescription
codea pull <project> [files...]Pull project + dependencies locally; optionally pull specific files
codea push <project> [files...]Push files back to device; omit files to push everything

Runtime

CommandDescription
codea run <project>Start a project
codea stopStop the running project
codea restartRestart the running project
codea exec "<lua>"Execute Lua in the running project
codea exec --file <path>Execute the contents of a Lua file in the running project
codea pausePause the running project
codea resumeResume the paused project
codea pausedCheck whether the running project is paused
`codea paused <on\off>`Pause or unpause the running project
codea screenshotSave screenshot as PNG
codea idle-timerCheck current idle timer state
`codea idle-timer <on\off>`Enable or disable the idle timer (off keeps the screen awake)
codea logsGet all log output since last clear
codea logs --head NGet first N lines (useful when an early error causes spam)
codea logs --tail NGet last N lines
codea logs --followStream new log lines in real time (Ctrl-C to stop)
codea clear-logsClear the log buffer

Dependencies

CommandDescription
codea deps ls <project>List project dependencies
codea deps available <project>List projects that can be added as dependencies
codea deps add <project> <dependency>Add a dependency
codea deps remove <project> <dependency>Remove a dependency

Documentation

CommandDescription
codea autocomplete <project> <code>Get Lua autocomplete suggestions for a code prefix (e.g. "asset.")
codea doc <function>Look up API documentation for a function (shows both runtimes); includes a "See also" list of related functions
codea doc <function> --modernShow only modern (Carbide) documentation
codea doc <function> --legacyShow only legacy documentation
codea doc <function> --project <name>Auto-select docs based on the project's runtime
codea search-doc <query>Search API docs by keyword; returns matching function names, descriptions, and [modern]/[legacy]/[both] tags
codea search-doc <query> --modernShow only modern (Carbide) results
codea search-doc <query> --legacyShow only legacy results
codea search-doc <query> --project <name>Auto-select runtime based on the project's runtime type

Pull / Push Details

codea pull "My Game" creates:

My Game/
  Main.lua
  Player.lua
  ...
  Dependencies/
    PhysicsLib/
      Physics.lua

codea push "My Game" pushes all files in ./My Game/ back, routing Dependencies/<name>/ files to the correct project on the device.

Use --output <dir> with pull and --input <dir> with push to specify a custom directory.

File Loading Order (Info.plist)

Each Codea project contains an Info.plist file. The Buffer Order key in this file is an array of strings that defines the order in which Lua files are loaded by the runtime.

<key>Buffer Order</key>
<array>
    <string>Main</string>
    <string>ClassA</string>
    <string>ClassB</string>
</array>

Managing this order is critical in several scenarios:

  • Global Variables: Any global variables or constants must be defined in a file that is loaded *before* they are used by other files.
  • Class Inheritance: Base classes must be loaded before any derived classes that inherit from them.
  • Initialization: Logic that expects certain systems to be initialized globally should be ordered appropriately.

When creating a new project with codea new and pulling it locally, the Buffer Order will typically only contain Main. As you add new .lua files to the project, you must update the Buffer Order in Info.plist and push the changes back to the device to ensure the project runs correctly.

Log Monitoring with --follow

The recommended pattern for monitoring logs while working is to start a background log stream before running the project:

codea clear-logs
codea logs --follow >> /tmp/codea.log &
codea run "My Game"

# ... edit files, push changes, take screenshots ...

cat /tmp/codea.log          # check all logs at any point
tail -n 20 /tmp/codea.log   # check recent output

This keeps /tmp/codea.log continuously updated so you can inspect it at any time without missing output between polls. Kill the background process when done:

kill %1   # or: pkill -f "codea logs --follow"

Runtime Types

Codea projects use one of two runtimes, stored as Runtime Type in Info.plist:

TypeInfo.plist valueDescription
Legacylegacy (or absent)Codea 3.x APIs
ModernmodernCodea 4.x / Carbide APIs

Use codea runtime <project> to check, and codea runtime <project> modern to switch an existing project's runtime. Use codea doc <function> --project <name> to get docs for the right runtime automatically.

Note: When creating a new project with codea new "My Game" --template Modern, the runtime is automatically set to modern — there is no need to also run codea runtime. Use codea runtime only when changing the runtime of an already-existing project.
Important: Do not switch the runtime by manually editing Runtime Type in Info.plist. The device caches project info in memory, so a pushed plist change is not picked up until codea runtime is used to update it on the device side.

Codea API Documentation

Use codea doc <function> to look up API documentation directly from the device — no browser needed. Always check docs before using an unfamiliar function. The output includes a "See also:" line listing sibling functions in the same group, which is useful for discovering related APIs without needing to know their names upfront.

Use codea search-doc <query> when you don't know the exact function name — it searches across names, descriptions, and help text in both runtimes and returns a list of matches.

codea doc background                        # show all available docs (legacy + modern)
codea doc background --project "My Game"    # show only what's relevant to the project
codea doc background --modern               # force modern (Carbide) docs
codea doc background --legacy               # force legacy docs
codea search-doc storage                    # find all storage-related functions
codea search-doc "draw sprite"              # keyword search across help text
codea search-doc physics --modern           # modern-only results
codea search-doc physics --project "My Game"  # auto-select runtime from project

For broader reference, the online docs are organized by topic:

- Animation: https://codea.io/reference/Animation.html - Craft (3D): https://codea.io/reference/Craft.html - Display & keyboard: https://codea.io/reference/Display.html - Graphics & assets: https://codea.io/reference/Graphics.html - Lua: https://codea.io/reference/Lua.html - Motion & location: https://codea.io/reference/Accelerometer.html - Network: https://codea.io/reference/Network.html - Parameters: https://codea.io/reference/Parameters.html - Physics: https://codea.io/reference/Physics.html - Shaders & Mesh: https://codea.io/reference/Shaders.html - Sounds: https://codea.io/reference/Sounds.html - Storage: https://codea.io/reference/Storage.html - Touch & input: https://codea.io/reference/Touch.html - Vector: https://codea.io/reference/Vector.html

Best Practices & Gotchas

Asset Strings

Asset strings using the Project:Asset format (e.g., readImage("Blobbo:empty")) are deprecated. You should use static assets instead:

  • Correct: asset.empty or asset.wall
  • Deprecated: readImage("Project:empty")

Missing roundRect

The roundRect function is not built-in to the Codea runtime. If your project requires rounded rectangles, you must implement the function yourself (e.g., using mesh or drawing multiple rect and ellipse calls).


Modern Runtime (Carbide) Gotchas

Text and Emojis

Emojis render as empty boxes with the default text renderer. To display emojis correctly, use TEXT_NATIVE:

style.push().textStyle(TEXT_NATIVE)
text("🎉 🚀 ❤️", x, y)
style.pop()

Note: TEXT_NATIVE uses the system font renderer; other textStyle flags (bold, italic, rich text, etc.) are ignored while it is active.

3D Coordinate System

Codea 4.x uses a left-handed, +Z-forward coordinate system (Metal convention). Objects must be at positive Z to be visible:

matrix.push()
    matrix.perspective(60)      -- camera at origin, looking toward +Z
    matrix.translate(0, 0, 4)   -- place object in front (positive Z)
    myMesh:draw()
matrix.pop()
-- Always wrap 3D in push/pop to restore 2D state afterwards

Mesh: vertices vs positions

For custom mesh geometry, use mesh.vertices = {...} (not mesh.positions). vertices auto-sets the index buffer so the mesh draws immediately. positions leaves the index buffer untouched — useful for deforming an existing mesh, but on a fresh empty mesh nothing will be drawn.

Mesh Lighting and Materials

Generated meshes (mesh.sphere(), mesh.box(), etc.) render black by default — they need a material or a light:

  • Unlit with color (no light needed): m.material = material.unlit(); m.material.color = color(r,g,b)
  • Lit with shading: m.material = material.lit(); m.material.color = color(r,g,b) + a directional light

Only light.directional() is currently supported in immediate mode — light.point() and light.spot() are defined but not yet implemented by the renderer.

Use light.push(lt) / light.pop() as static functions, not methods:

local lt = light.directional(vec3(1, -1, 1))
light.push(lt)
myMesh:draw()
light.pop()

Notes for Agents

  • Always pull before editing to get the latest files from device
  • Use sleep 2 or similar between run and screenshot to let the project render a frame
  • exec requires a project to already be running
  • Screenshot returns a PNG — save it and use vision to inspect results; do not open it in an external app unless the user explicitly asks
  • codea logs accumulates all output since last clear-logs; use --head 20 when Codea is spamming a repeated error to find the original cause
  • File paths on device use codea:// URIs internally; you don't need to deal with these directly

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.39%
按下载量换算21

Claude

29.46%
按下载量换算19

Cursor

19.15%
按下载量换算12

Gemini CLI

8.65%
按下载量换算5

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills