Logo Environments

Environments

Cộng đồng
phuryn
environments

Adding a variable or secret, 'set up production', a domain or a provider token, 'which database is this', a leaked key: dev and production for an AI-built app, backups, incidents.

Tổng quan

Nhà phát hànhphuryn
Kho mãproduct-engineering
Tên kỹ năngenvironments
Sao
189
Bản fork
27
Tệp đi kèm
6
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 6 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được phuryn công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Environments trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/phuryn/product-engineering/tree/main/app-stack/skills/environments
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/phuryn/product-engineering.git /tmp/product-engineering
mkdir -p .claude/skills
cp -r /tmp/product-engineering/app-stack/skills/environments .claude/skills/environments
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Environments trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Environments ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Environments với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Environments — development, production, and what moves between them

Two of everything, never mixed, and every claim about which is which written down with the date it was checked. This skill is how the environments are kept apart, how configuration and secrets enter them and leave them, how a schema change meets the code that is already serving, and what to do when something leaks, breaks or has to be rebuilt.

The rules were learned on Next.js (App Router) + Supabase + Clerk + Netlify, by several products: a live Q&A product, a monitoring product that also runs Workers and worker boxes, and others, named here only by kind. Each states its principle first and the stack's mechanism second; on another stack, keep the principle and swap the mechanism. The product's own instructions come first — where they name its environments doc, variables doc or branches, follow them.

The product's records this skill writes to, whatever the product calls them:

  • the environments doc: which resource each environment uses, verified and dated, ending in the environment log, one row per environment event;
  • the variables doc: one row per variable, and where every copy of each secret lives;
  • the env schema: the one module that validates configuration, at build and at boot;
  • .env, the local configuration, never committed, and .env.example, its committed list of placeholders;
  • the backlog: deferred work, each item with its reason and the trigger that reopens it.

What binds

  • The target is stated, never inferred. Every command that reads or writes an environment names it (a project ref, a URL, an instance) rather than inheriting it from whatever a config file was last left pointing at. A per-machine, gitignored config (an MCP server's, a CLI's link) may name production today and development tomorrow, and a CLI given both a link and a typed ref may follow either. So the database CLI is never linked: each environment's database is reached by its own connection string, and no command depends on which flag wins. (2026-09-16, an MCP configuration named production while the product's instructions still blessed migration writes through it. 2026-10-23, a monitoring product found db push --linked with production's ref writing to the linked development project; 2026-10-25, a probe of the current CLI saw the first request go to the typed ref instead.) Operator tooling has no production default: a command that writes to something both environments share (one DNS zone, one account) refuses to run until its target is named. references/environments-and-branches.md § Operator commands; the database mechanics are supabase-production.
  • Separate development and production resources and key sets, none shared, operator credentials included: one provider token or SSH key in both environments' files means a leak from any development checkout reaches production. (2026-10-24, a monitoring product's inventory found the same DNS-provider token, cloud token and root SSH key in both.) The app refuses to build and to boot on a partial configuration. Production's generated secrets are generated afresh, never copied from development.
  • Record the verified mapping — which resource each environment uses — with the date it was checked, and the command that showed it. Re-read it, never remember it: mappings move. (2026-09-15, a product's former development database was promoted to production and a new development branch created.) A line in the environments doc still holding a placeholder is a thing that has not happened yet.
  • Secrets are never in the repository, a URL, a log line, a command line or a client bundle. Every module that imports one is marked server-only (on Next.js, import "server-only"), so a client import fails the build. Only NEXT_PUBLIC_* values reach the browser.
  • Every new environment variable gets three things in the same change: a placeholder in .env.example, a row in the variables doc, and a line in the env schema that fails when it is missing. The schema runs at build and dev start, not only at boot, because a NEXT_PUBLIC_* value is inlined into the client bundle when the build runs, and a boot check comes after the leak. It checks each key's shape where the vendor gives one and never echoes a value. (2026-10-10, a product's .env held the Clerk secret key in the publishable variable; caught before anything was built with it.) references/variables.md.
  • A value you generate rather than fetch is generated now. A cookie-signing secret, a token pepper, anything of that shape: generate it, write it where that environment's values live: development's into the development checkout's .env; production's, generated afresh, into the production operator file outside the development checkout (never a .env* file there: next build reads .env.production) until go-live step 3 puts it on the host; and name it in your summary. Nobody can look that value up, so a placeholder left empty is a boot failure with no instruction attached to it. One that seals or tags stored data can never be replaced without breaking that data: keep a copy off the operator's machine (references/variables.md § The kinds of variable).
  • Know whether a push applies migrations, and apply them by hand before the push (production's after the owner's go). Applying before the push opens a window where every build still serving, the app's and each separately deployed runtime's, meets the new schema. Every pending migration is written to survive that window, a contracting one waits outside the migrations directory until every runtime has moved past it, or the outage is named in the go/no-go. references/migrations-window.md.
  • A tunnel's address is public. Development only, the link to the owner and nowhere else (never a deployed runtime's configuration), closed when the owner is done. references/environments-and-branches.md § Showing development to the owner.
  • Every holder keeps its own copy of a secret: the host, each Worker, each box, and the operator's .env that a deploy uploads again. Keep a map of every copy. A planned rotation revokes last: make the new value beside the old, put it into every holder and deploy each, check it works, then revoke the old one. Revoking first breaks whatever still holds the old value, and a deploy from an operator file not yet updated puts the old value back. (2026-10-24, a monitoring product rotated its identity provider's production key on the app's host only; a Worker still held the old key, so deleting it would have silently stopped members' email.) A push redeploys only the app; the rest is release-gate. references/variables.md § Where every copy lives, § Rotating.
  • A leaked key is the same order, done at once, and written in the environment log. If it is being used against you, revoke first and accept that every holder fails until it has the new value. If a build or a dev server ever ran with a secret in a public variable, that secret was served: rotate it.
  • A backup is not verified until a restore drill has run, with its date and result recorded. A provider's schedule is not evidence, and a database backup is not the system: list what no backup holds and how each comes back. Once the product runs more than its host builds, keep a runbook for rebuilding both environments from nothing. references/data-and-incidents.md § Backups and restore, references/rebuild-from-nothing.md.
  • No screen and no legal page promises automatic deletion until the job that deletes exists.

When you are…

When you are…Read
setting up an environment, recording which database or instance is which, naming branches, writing an operator commandreferences/environments-and-branches.md
showing a change to the owner before it is deployedreferences/environments-and-branches.md § Showing development to the owner
adding, renaming or reading an environment variable; adding a secret; before go-livereferences/variables.md
pointing a domain at the product; giving the agent a provider's token; which host goes behind a proxy; before the first usersreferences/domain-and-provider-access.md
rotating a key; finding every place a secret is heldreferences/variables.md § Where every copy lives, § Rotating
writing a migration the deployed code will meet; renaming or dropping a column; revoking a grant; promoting a release with pending migrationsreferences/migrations-window.md
promising retention, deleting a workspace, listing what is held about people, backups, an incident, a leaked key, writing the environment logreferences/data-and-incidents.md
rebuilding an environment from empty accounts, or writing the runbook for itreferences/rebuild-from-nothing.md

How you can tell it worked

Every variable the code reads is in the variables record with where it lives in each environment, development never reaches production's data, and a leaked key would be retired by one rotation.

Files

FileHolds
references/environments-and-branches.mdthe environments table; recording the verified mapping and the inventory; branches and sites; operator commands; showing development to the owner through a Cloudflare quick tunnel
references/variables.mdthe variables doc's columns; the kinds of variable and how each is handled; the env schema's contract; setting values on the host; where every copy lives; rotating; the pre-go-live checklist
references/domain-and-provider-access.mdwho creates and scopes each provider credential and what stays the owner's; the domain's order, from the nameservers to a certificate; proxy or DNS-only per host; what to tighten before the first users
references/migrations-window.mdwhether a push applies migrations; the window between applying a migration and every runtime's new build going live; compatible changes; expand and contract, for columns and for grants; what to name in the go/no-go
references/data-and-incidents.mddata that expires; what we hold about people; backups, and what no backup holds; incident basics, the symptom table and panic buttons; a leaked key; the environment log
references/rebuild-from-nothing.mdthe runbook for recreating both environments from empty accounts: what the repository cannot reproduce, the order, and what each step needs

Related skills: release-gate (the release checklist, rollback, the runtimes a push does not redeploy, Netlify's edge) · supabase-production (the migration ledger, --db-url and why the CLI is never linked, a second runtime's database login, database gotchas) · clerk-production (the production instance, its keys and DNS) · transactional-email (one provider server per environment, the development redirect) · test-harness (the harness's own variables and the pinned .env) · saas-authorization (the threat model the secrets rules come from) · shipping-artifacts (the variables doc as a reviewer reads it).

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Environments làm được gì?

Adding a variable or secret, 'set up production', a domain or a provider token, 'which database is this', a leaked key: dev and production for an AI-built app, backups, incidents.

Vì sao nên dùng Environments trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Environments là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Environments trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/phuryn/product-engineering/tree/main/app-stack/skills/environments. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Environments?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Environments với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Environments với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Environments có miễn phí không?

Có. Kỹ năng này được phuryn phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇