Capsule Development
하는 일
이 스킬은 Unicity AOS 안에서 실행되는 작은 보안 프로그램인 캡슐을 만드는 과정을 안내합니다. 에이전트 시스템을 위해 새 프로그램 조각을 작성하고 설치하려는 개발자를 위한 것입니다.
사용하는 경우
- ✓Unicity AOS 설정을 위한 새 캡슐을 시작하고 싶을 때.
- ✓캡슐이 빌드, 링크, 설치에 실패해 디버깅해야 할 때.
- ✓캡슐의 접근 규칙이 올바르게 설정되었는지 확인해야 할 때.
스킬 링크
https://github.com/unicity-aos/aos-ce/blob/main/capsules/capsule-system/src/skills/capsule-development/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“지원되는 템플릿으로 새 Unicity AOS 캡슐을 만들고, 빌드한 뒤 테스트용으로 설치해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 공식 프로젝트 템플릿에서 시작해 매니페스트를 설정합니다. 매니페스트는 캡슐이 접근할 수 있는 것을 조절합니다. 그다음 필요한 대상으로 빌드하고 설치 전에 접근 목록을 확인합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Capsule Development
A capsule is a Rust WebAssembly component that runs inside the Astrid Runtime sandbox shipped by Unicity AOS. The runtime routes IPC, enforces capabilities, mediates host access, and audits execution. Business logic belongs in capsules.
The manifest is part of the security boundary. Its [publish] and [subscribe]
tables are the IPC access-control list: a topic that is not declared is denied.
Capsules target wasm32-unknown-unknown, not WASI, and reach the host only through
the audited SDK/WIT imports granted by the manifest.
Start from the supported scaffold
aos capsule new my-capsule
cd my-capsule
The generated project contains:
my-capsule/
├── .cargo/config.toml
├── rust-toolchain.toml
├── Cargo.toml
├── Capsule.toml
└── src/lib.rs
Do not begin from an old [[interceptor]] manifest or an ipc_publish /
ipc_subscribe capability array. Those formats are obsolete.
Compiler target
.cargo/config.toml selects the capsule target and activates the SDK's custom
randomness backend:
[build]
target = "wasm32-unknown-unknown"
[target.wasm32-unknown-unknown]
rustflags = ["--cfg=getrandom_backend=\"custom\""]
The getrandom_backend setting must live in the final capsule crate. Without it,
dependencies such as UUID generators or randomized hash maps can fail to link.
Pin the toolchain and target in rust-toolchain.toml:
[toolchain]
channel = "1.94.0"
targets = ["wasm32-unknown-unknown"]
components = ["rustfmt", "clippy"]
Cargo package
Use a cdylib and the current 0.7 SDK surface:
[package]
name = "my-capsule"
version = "0.1.0"
edition = "2024"
publish = false
[lib]
crate-type = ["cdylib"]
[dependencies]
astrid-sdk = { version = "0.7", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
strip = true
panic = "abort"
Capsule manifest
This minimal tool capsule exposes one hello tool:
[package]
name = "my-capsule"
version = "0.1.0"
description = "A small example capsule"
authors = ["Your Name <you@example.com>"]
astrid-version = ">=0.7.0"
[[component]]
id = "my-capsule"
file = "my_capsule.wasm"
type = "executable"
[capabilities]
fs_read = ["home://data/my-capsule/"]
fs_write = ["home://data/my-capsule/"]
[publish]
"tool.v1.execute.*.result" = { wit = "@unicity-astrid/wit/types/tool-call-result" }
"tool.v1.response.describe.*" = { wit = "@unicity-astrid/wit/tool/describe-response" }
[subscribe]
"tool.v1.execute.hello" = { wit = "@unicity-astrid/wit/types/tool-call", handler = "tool_execute_hello" }
"tool.v1.request.describe" = { wit = "@unicity-astrid/wit/tool/describe-request", handler = "tool_describe" }
Skills are agent user-space instructions, not a Capsule.toml protocol. Ship a trigger Skill through the host plugin or the agent-level Skills service, and expose capsule-owned reference material through typed IPC tools when useful. Do not add an agent Skill section to the manifest or request filesystem write authority merely to modify a host's instruction directory.
The published @unicity-astrid/wit/... strings and astrid:* WIT namespaces
are stable runtime identifiers. Keep them exact even though the product CLI is
aos.
For a tool capsule, both publish entries are required: one returns tool results,
and the other answers the describe fan-out that makes tools visible to agents.
Every tool needs its own concrete execute subscription. A subscribe wildcard may
have one trailing *; publish permissions should be as narrow as practical.
Manifest data is untrusted input. Do not put operator authority, principal identity, or a secret scope in a capsule-controlled field. The kernel stamps the caller identity and decides operator-only policy.
Implement a tool
#![deny(unsafe_code)]
#![deny(clippy::all)]
use astrid_sdk::prelude::*;
use astrid_sdk::schemars;
use serde::Deserialize;
#[derive(Default)]
pub struct MyCapsule;
#[derive(Debug, Default, Deserialize, schemars::JsonSchema)]
pub struct HelloArgs {
/// Person to greet.
pub name: String,
}
#[capsule]
impl MyCapsule {
/// Greet a person by name.
#[astrid::tool("hello")]
pub fn hello(&self, args: HelloArgs) -> Result<String, SysError> {
Ok(format!("Hello, {}!", args.name))
}
}
The tool macro derives the input schema from JsonSchema, uses the method's doc
comment as the tool desc
자주 묻는 질문
매니페스트가 왜 중요한가요?
접근 목록이 캡슐이 보내고 받을 수 있는 메시지를 통제하며, 선언되지 않은 것은 모두 거부됩니다.
오래된 예제에서 시작해도 되나요?
아닙니다. 이전 매니페스트 형식은 폐기되었으므로 스킬은 현재 템플릿에서 시작합니다.
Rust를 알아야 하나요?
스킬은 Rust를 사용하므로, Rust를 아는 개발자가 가장 큰 도움을 받습니다.
상세 정보
작성자의 원본 설명
Build, test, package, install, and debug a current Unicity AOS capsule
repo: unicity-aos/aos-ce
인기도
- GitHub 스타
- 8.5k
- 순위
- #12454
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 10. 22.
댓글
- …
이 저장소의 다른 스킬
capsule-forge
8.5k에이전트가 새 능력을 스킬, 캡슐, 플러그인 중 무엇으로 만들지 정하고, Unicity AOS 시스템에서 그것을 만들거나 고치도록 돕습니다.
meta-harness
8.5k에이전트가 실제 작업 중 자신의 도구, 메모리, 지침이 부족한 곳을 알아채고, 이를 개선해 더 나은 버전을 유지하도록 돕습니다.
비슷한 스킬
api-connector-builder
280k에이전트가 기존 패턴을 따라 새로운 API 연결을 만들도록 합니다. 새로운 방식을 도입하지 않고 연동을 하나 더 추가할 때 씁니다.
api-design
280k에이전트가 모범 사례에 따라 REST API를 설계하도록 돕습니다. API가 통신하는 방식, 오류를 보여 주는 방식, 데이터를 정리하는 방식을 정하는 데 유용합니다.
backend-patterns
280k에이전트가 서버 쪽 아키텍처 패턴과 데이터베이스 최적화를 다루도록 돕습니다. 서버에서 실행되는 코드를 만들거나 검토할 때 유용합니다.