CommunityRedacción y edicióngithub.com

Astra-97/astra-codex-skills

Codex skills authored for Astra: safe context forge and CNKI-to-Zotero pipeline

¿Qué es astra-codex-skills?

astra-codex-skills is a Codex agent skill that codex skills authored for Astra: safe context forge and CNKI-to-Zotero pipeline.

Compatible con~Claude CodeCodex CLI~Cursor
npx skills add Astra-97/astra-codex-skills

Installed? Explore more Redacción y edición skills: steipete/notion, affaan-m/seo, affaan-m/brand-voice · View all 6 →

Preguntar en tu IA favorita

Abre un nuevo chat con esta habilidad de agente ya precargada.

Documentación

Safe Context Forge

Use the installed Stop hook to detect the 80% boundary for the exact active thread, then create a genuinely new persistent thread with codex exec --json. Do not use codex fork: it copies the full source context and therefore does not free context space. The hook only schedules one model-visible continuation; the agent performs the reviewed handoff.

Workflow

  1. If invoked by the Stop hook, use the complete session UUID in its continuation prompt. Otherwise obtain the UUID from current App/thread metadata. Never infer it from the newest rollout file.

  2. Inspect only that session:

    py -3 scripts\safe_context_forge.py inspect --session-id <UUID>
    
  3. Stop if threshold_reached is false. Context usage is the latest last_token_usage.total_tokens / model_context_window, not cumulative total_token_usage.

  4. Tell the user that the automatic handoff is starting. Build a short private JSON handoff containing unfinished work, critical decisions, verification results, risks, and the next action. Do not paste transcript events, credentials, private URLs, auth headers, raw tool output, file contents, absolute paths, or filenames. See handoff-schema.md.

  5. Run preparation, dry-run reporting, source fingerprint verification, and apply inside one script process. This matters because a separate tool result would append to the source transcript and correctly make an earlier artifact stale:

    py -3 scripts\safe_context_forge.py run --session-id <UUID> --handoff <handoff.json> --apply --confirm-session <UUID>
    
  6. For manual inspection without creating a thread, omit --apply. The default is dry-run and leaves the private artifact path in its output:

    py -3 scripts\safe_context_forge.py run --session-id <UUID> --handoff <handoff.json>
    
  7. Verify the new thread emits thread.started, replies exactly forge-ready, and is promoted for Desktop display. If it fails, keep using the old thread; failed candidates remain non-Desktop or are moved to quarantine.

Guardrails

  • Require an explicit full UUID for every operation. Refuse duplicate matches.
  • Keep dry-run as the default. Do not use --last or file modification time as identity.
  • Never stop the App, modify a rollout, switch an active-thread pointer, or delete a source/backup.
  • Keep the Stop hook in ~/.codex/hooks.json; never replace the existing notify command in config.toml.
  • Honor stop_hook_active: the hook may request only one continuation, preventing a loop.
  • Treat ~/.codex/safe-context-forge/completed/<source-session>.json as the one-shot marker. Never forge a marked source again automatically.
  • Re-run inspect immediately before applying if the thread has continued substantially.
  • Treat generated artifacts as sensitive and delete them after successful acknowledgement if the user authorizes cleanup.

Read environment-notes.md only when compatibility or automation behavior needs explanation. The user must review and trust the installed hook once in /hooks; until then Codex skips it.

Skills relacionados

steipete/notion

Notion CLI/API for pages, Markdown content, data sources, files, comments, search, Workers, and raw API calls.

community

affaan-m/seo

Audit, plan, and implement SEO improvements across technical SEO, on-page optimization, structured data, Core Web Vitals, and content strategy. Use when the user wants better search visibility, SEO remediation, schema markup, sitemap/robots work, or keyword mapping.

community

affaan-m/brand-voice

Build a source-derived writing style profile from real posts, essays, launch notes, docs, or site copy, then reuse that profile across content, outreach, and social workflows. Use when the user wants voice consistency without generic AI writing tropes.

community

affaan-m/crosspost

Multi-platform content distribution across X, LinkedIn, Threads, and Bluesky. Adapts content per platform using content-engine patterns. Never posts identical content cross-platform. Use when the user wants to distribute content across social platforms.

community

affaan-m/x-api

X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.

community

affaan-m/content-engine

Create platform-native content systems for X, LinkedIn, TikTok, YouTube, newsletters, and repurposed multi-platform campaigns. Use when the user wants social posts, threads, scripts, content calendars, or one source asset adapted cleanly across platforms.

community