{"id":"c2b62645-71bb-4b5b-a1bb-826462565cb2","shortId":"xceMS4","kind":"skill","title":"string","tagline":"Markdown that runs — one file, any agent.","description":"# Install String (skill for AI agents)\n\nYou are reading this to learn how to install String and call SFMD apps from any shell tool. Follow these steps in order.\n\n## 1. Install\n\n```bash\nnpm install -g @string-os/string\n```\n\nRequires Node.js 20+. The daemon (`stringd`) auto-starts on first call — no manual `--daemon start` needed. Verify:\n\n```bash\nstring --help\n```\n\n## 2. The output frame\n\nEvery `string` call wraps stdout in:\n\n```\n<𝒞=string:<topic>>\n...payload...\n</𝒞>\n```\n\nRead the payload between the markers. The opener tells you which topic the call ran in.\n\n## 3. Call shape\n\n```bash\nstring <topic> '<command>'\n```\n\nA **topic** is the session label and scopes session state (current document, history, env vars).\n\n| Form | Use |\n|---|---|\n| `<name>` | Free-form session — bare label you pick (e.g. `main`, `notes`, `setup`). Default when no topic is given is `main`. |\n| `app:<name>` | Running an installed app |\n| `app:<name>:<config>` | Same app with a config-scoped env (e.g. `app:weather:seoul` for region-specific API key) |\n| `bash:<name>` | Persistent shell session |\n| `app`, `bash`, `tool`, `system` | Reserved hub topics — placeholder pages in 0.1; listings and management actions arrive in 0.2 |\n\nSame topic = same state. Reserved hub names cannot be used as free-form labels.\n\n## 4. Open an app and discover its actions\n\n```bash\nstring app:weather '/open app:weather'\n```\n\nResponse starts with the action menu:\n\n```\n[actions] now, forecast, search  ·  /act --help (all)  ·  /act.<name> --help\n```\n\nThat line is your discovery output — every action the app exposes. For a single action's field schema, run `/act.<name> --help`; for every action on the doc at once, `/act --help`. Inside an `app:` topic, `/open` with no argument re-opens the app's home.\n\n## 5. Run an action\n\n```bash\nstring app:weather '/act.now --city Seoul'\n# Positional (declaration order):\nstring app:weather '/act.now Seoul'\n# Short alias if defined:\nstring app:weather '/act.now -c Seoul'\n# Multi-word values — quote or use +:\nstring app:weather '/act.now \"New York\"'\nstring app:weather '/act.now New+York'\n# Field schema:\nstring app:weather '/act.now --help'\n```\n\nSuccessful output:\n\n```\n<𝒞=string:app:weather>\nseoul: Sunny +20°C ↘6km/h\n</𝒞>\n```\n\n## 6. Install a new app\n\nFrom the cookbook (canonical example collection):\n\n```bash\ngit clone https://github.com/string-os/cookbook.git\ncd cookbook\nstring setup '/install --app ./apps/weather/string.md'\n```\n\nFrom any URL:\n\n```bash\nstring setup '/install --app https://example.com/my-app/string.md'\n```\n\nThe runtime copies the file into `~/.string/users/default/packages/<name>/` and registers it. From this point on, `app:<name>` resolves from any session.\n\nAvailable apps in the cookbook:\n\n| App | What it does | Needs |\n|---|---|---|\n| `weather` | wttr.in wrapper: `now`, `forecast`, `search` | nothing |\n| `moltbook` | Multi-file social network demo (feed, posts, comments, profile) | API key |\n| `moltbook-single` | Same demo, single-file variant — for layout comparison | API key |\n| `nano-banana-pro` | Image generation via Gemini Nano Banana Pro | API key |\n\n## 7. Set credentials\n\nApps that need API keys declare `requires: [VAR_NAME]` in frontmatter. When you `/open` an app without the var set, the response begins with:\n\n```\n[!] Missing required env: $MOLTBOOK_API_KEY\n    Set: /set $MOLTBOOK_API_KEY = \"...\"\n    Setup: /open requirements.md\n```\n\nSet the var with `/set` (persists to disk in the current topic's scope):\n\n```bash\nstring app:moltbook '/set $MOLTBOOK_API_KEY = \"moltbook_xxx\"'\n```\n\n| Topic when running `/set` | Where it persists |\n|---|---|\n| free-form (`main`, `notes`, ...) | Global (`config.json`) |\n| `app:<name>` | App scope (`apps/<name>/env.json`) |\n| `app:<name>:<config>` | Config scope (`apps/<name>/<config>/env.json`) |\n\nResolution cascades: config → app → global. A var set globally is visible to every app unless overridden at a more specific scope.\n\nShell-exported `export VAR=...` also works as a fallback (the daemon reads `process.env`), but `/set` is preferred — survives daemon restarts and keeps secrets out of shell history.\n\n## 8. Handle action errors\n\nWhen an action fails and the app has a `requirements.md`, the error gets a trailing hint:\n\n```\nERROR(EXIT_127): kubectl: command not found\n\nSetup info: /open requirements.md\n```\n\nWhen you see that, run `string app:<name> '/open requirements.md'` to see what to install or configure. Then retry the action.\n\n## Reference\n\n| Command | What it does |\n|---|---|\n| `/open <path \\| app:name \\| URL>` | Open document or app |\n| `/open` | Re-open current app's home (in `app:` topic) |\n| `/back` | Previous page |\n| `/close` | Close current document |\n| `/refresh` | Reload current document |\n| `/info` | Session state (current app, version, action list, history depth) |\n| `/ls [path]` | List files in a directory |\n| `/help` | All commands + current page actions |\n| `/act.<name> [flags]` | Run action — positional or `--flag value` |\n| `/act.<name> --help` | Field schema for that action |\n| `/tool:<name> [args]` | Run an installed tool (default action) — POSIX CLI shape |\n| `/tool:<name>.<act> [args]` | Run a named action on a tool |\n| `/install --app \\| --tool <source>` | Install from local path or URL |\n| `/uninstall <name>` | Remove installed package |\n| `/set $VAR = \"value\"` | Persistent env var, scoped to current topic |\n| `/set` | List session vars + persistent vars in scope |\n\n## More\n\n- [Documentation](https://docs.string-os.org)\n- [Cookbook (example apps + walkthroughs)](https://github.com/string-os/cookbook)\n- [Source](https://github.com/string-os/string)","tags":["string","string-os","agent-runtime","agent-skills","ai-agents","cli","commonmark","llm","markdown","mcp"],"capabilities":["skill","source-string-os","skill-string","topic-agent-runtime","topic-agent-skills","topic-ai-agents","topic-cli","topic-commonmark","topic-llm","topic-markdown","topic-mcp"],"categories":["string"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/string-os/string","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add string-os/string","source_repo":"https://github.com/string-os/string","install_from":"skills.sh"}},"qualityScore":"0.458","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 16 github stars · SKILL.md body (5,617 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:06:14.168Z","embedding":null,"createdAt":"2026-05-09T01:04:45.439Z","updatedAt":"2026-05-18T19:06:14.168Z","lastSeenAt":"2026-05-18T19:06:14.168Z","tsv":"'+20':341 '/.string/users/default/packages':386 '/act':227,230,251,261,704,712 '/act.now':286,295,304,317,323,331 '/apps/weather/string.md':368 '/back':670 '/close':673 '/env.json':539,544 '/help':698 '/info':681 '/install':366,375,739 '/ls':691 '/my-app/string.md''':379 '/open':214,267,472,495,623,632,650,659 '/refresh':677 '/set':490,501,515,524,581,752,762 '/string':47 '/string-os/cookbook)':779 '/string-os/cookbook.git':361 '/string-os/string)':783 '/tool':719,730 '/uninstall':748 '0.1':179 '0.2':186 '1':38 '127':616 '2':69 '20':50 '3':99 '4':202 '5':278 '6':345 '6km/h':343 '7':456 '8':594 'action':183,209,221,223,239,246,255,281,596,600,644,687,703,707,718,726,735 'agent':8,14 'ai':13 'alia':298 'also':571 'api':163,427,441,454,462,487,492,517 'app':28,141,145,146,148,156,169,205,212,215,241,265,275,284,293,302,315,321,329,337,349,367,376,394,400,404,459,474,513,535,536,538,540,543,548,558,604,631,652,658,664,668,685,740,775 'arg':720,731 'argument':270 'arriv':184 'auto':55 'auto-start':54 'avail':399 'banana':445,452 'bare':125 'bash':40,66,102,165,170,210,282,356,372,511 'begin':481 'c':305,342 'call':26,59,75,96,100 'cannot':194 'canon':353 'cascad':546 'cd':362 'citi':287 'cli':728 'clone':358 'close':674 'collect':355 'command':618,646,700 'comment':425 'comparison':440 'config':152,541,547 'config-scop':151 'config.json':534 'configur':640 'cookbook':352,363,403,773 'copi':382 'credenti':458 'current':114,507,663,675,679,684,701,760 'daemon':52,62,577,585 'declar':290,464 'default':133,725 'defin':300 'demo':422,433 'depth':690 'directori':697 'discov':207 'discoveri':236 'disk':504 'doc':258 'docs.string-os.org':772 'document':115,656,676,680,771 'e.g':129,155 'env':117,154,485,756 'error':597,609,614 'everi':73,238,254,557 'exampl':354,774 'example.com':378 'example.com/my-app/string.md''':377 'exit':615 'export':568,569 'expos':242 'fail':601 'fallback':575 'feed':423 'field':248,326,714 'file':6,384,419,436,694 'first':58 'flag':705,710 'follow':33 'forecast':225,413 'form':119,123,200,530 'found':620 'frame':72 'free':122,199,529 'free-form':121,198,528 'frontmatt':469 'g':43 'gemini':450 'generat':448 'get':610 'git':357 'github.com':360,778,782 'github.com/string-os/cookbook)':777 'github.com/string-os/cookbook.git':359 'github.com/string-os/string)':781 'given':138 'global':533,549,553 'handl':595 'help':68,228,231,252,262,332,713 'hint':613 'histori':116,593,689 'home':277,666 'hub':174,192 'imag':447 'info':622 'insid':263 'instal':9,23,39,42,144,346,638,723,742,750 'keep':588 'key':164,428,442,455,463,488,493,518 'kubectl':617 'label':109,126,201 'layout':439 'learn':20 'line':233 'list':180,688,693,763 'local':744 'main':130,140,531 'manag':182 'manual':61 'markdown':2 'marker':88 'menu':222 'miss':483 'moltbook':416,430,486,491,514,516,519 'moltbook-singl':429 'multi':308,418 'multi-fil':417 'multi-word':307 'name':193,467,653,734 'nano':444,451 'nano-banana-pro':443 'need':64,408,461 'network':421 'new':318,324,348 'node.js':49 'note':131,532 'noth':415 'npm':41 'one':5 'open':90,203,273,655,662 'order':37,291 'os':46 'output':71,237,334 'overridden':560 'packag':751 'page':177,672,702 'path':651,692,745 'payload':81,85 'persist':166,502,527,755,766 'pick':128 'placehold':176 'point':392 'posit':289,708 'posix':727 'post':424 'prefer':583 'previous':671 'pro':446,453 'process.env':579 'profil':426 'quot':311 'ran':97 're':272,661 're-open':271,660 'read':17,83,578 'refer':645 'region':161 'region-specif':160 'regist':388 'reload':678 'remov':749 'requir':48,465,484 'requirements.md':496,607,624,633 'reserv':173,191 'resolut':545 'resolv':395 'respons':217,480 'restart':586 'retri':642 'run':4,142,250,279,523,629,706,721,732 'runtim':381 'schema':249,327,715 'scope':111,153,510,537,542,565,758,769 'search':226,414 'secret':589 'see':627,635 'seoul':158,288,296,306,339 'session':108,112,124,168,398,682,764 'set':457,478,489,497,552 'setup':132,365,374,494,621 'sfmd':27 'shape':101,729 'shell':31,167,567,592 'shell-export':566 'short':297 'singl':245,431,435 'single-fil':434 'skill':11 'skill-string' 'social':420 'sourc':780 'source-string-os' 'specif':162,564 'start':56,63,218 'state':113,190,683 'stdout':77 'step':35 'string':1,10,24,45,67,74,80,103,211,283,292,301,314,320,328,336,364,373,512,630 'string-o':44 'stringd':53 'success':333 'sunni':340 'surviv':584 'system':172 'tell':91 'tool':32,171,724,738,741 'topic':94,105,136,175,188,266,508,521,669,761 'topic-agent-runtime' 'topic-agent-skills' 'topic-ai-agents' 'topic-cli' 'topic-commonmark' 'topic-llm' 'topic-markdown' 'topic-mcp' 'trail':612 'unless':559 'url':371,654,747 'use':120,196,313 'valu':310,711,754 'var':118,466,477,499,551,570,753,757,765,767 'variant':437 'verifi':65 'version':686 'via':449 'visibl':555 'walkthrough':776 'weather':157,213,216,285,294,303,316,322,330,338,409 'without':475 'word':309 'work':572 'wrap':76 'wrapper':411 'wttr.in':410 'xxx':520 'york':319,325 '𝒞':79,82,335,344","prices":[{"id":"b9704a4a-1541-411b-9bcb-838987c55ce7","listingId":"c2b62645-71bb-4b5b-a1bb-826462565cb2","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"string-os","category":"string","install_from":"skills.sh"},"createdAt":"2026-05-09T01:04:45.439Z"}],"sources":[{"listingId":"c2b62645-71bb-4b5b-a1bb-826462565cb2","source":"github","sourceId":"string-os/string","sourceUrl":"https://github.com/string-os/string","isPrimary":false,"firstSeenAt":"2026-05-09T01:04:45.439Z","lastSeenAt":"2026-05-18T19:06:14.168Z"}],"details":{"listingId":"c2b62645-71bb-4b5b-a1bb-826462565cb2","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"string-os","slug":"string","github":{"repo":"string-os/string","stars":16,"topics":["agent-runtime","agent-skills","ai-agents","cli","commonmark","llm","markdown","mcp"],"license":"mit","html_url":"https://github.com/string-os/string","pushed_at":"2026-05-17T07:53:10Z","description":"Markdown that runs — one file, any agent.","skill_md_sha":"e1f9d271e80f05b2e8a59aa1f0421b882f7cc186","skill_md_path":"skill.md","default_branch":"main","skill_tree_url":"https://github.com/string-os/string"},"layout":"root","source":"github","category":"string","frontmatter":{},"skills_sh_url":"https://skills.sh/string-os/string"},"updatedAt":"2026-05-18T19:06:14.168Z"}}