一键导入
configure-expression
Use when: editing enable_expression config fields, environment-variable expansion syntax, YAML deployment values, or atapp config templates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when: editing enable_expression config fields, environment-variable expansion syntax, YAML deployment values, or atapp config templates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when: generating deployment configs, rendering per-instance scripts, editing Helm values, analyzing install/**/*.tpl Go templates, yaml.tpl/sh.tpl/bat.tpl files, or using atdtool deployment workflows.
Use when: auditing or optimizing AI agent prompts, bridge files, skills, SKILL.md metadata, and cross-tool compatibility.
Use when: writing or reviewing C++/CMake/Markdown code, applying project engineering conventions, checking cpplint, clang-format, cmake-format, cmake-lint, markdownlint, clang-tidy, protobuf, RPC, generated-code, service/component CMake rules.
Use when: working on atgateway v2 protocol code, ECDH handshakes, encryption, compression, reconnection, FlatBuffers schema, or gateway unit tests.
Use when: configuring or building atsf4g-co with CMake, resolving build errors, or adjusting Windows/MSVC/vcpkg and Unix/Linux/macOS build options.
Use when: running or writing unit tests, discovering/filtering private test-framework cases, or fixing Windows DLL/PATH test startup issues.
| name | configure-expression |
| description | Use when: editing enable_expression config fields, environment-variable expansion syntax, YAML deployment values, or atapp config templates. |
Protobuf fields annotated with enable_expression: true in the atapp_configure_meta extension
(defined in atapp_conf.proto) support environment-variable expression expansion at config-load time.
This is implemented in libatapp and available to all services that load configuration through the
standard atapp config loaders (YAML, INI .conf, environment-variable files).
| Syntax | Description |
|---|---|
$VAR | Bare variable — POSIX names only ([A-Za-z_][A-Za-z0-9_]*) |
${VAR} | Braced variable — any characters including ., -, / (k8s labels) |
${VAR:-default} | If VAR is unset or empty, expand to default |
${VAR:+word} | If VAR is set and non-empty, expand to word; otherwise empty string |
\$ | Literal dollar sign (escape) |
| Nested | ${OUTER_${INNER}}, ${VAR:-${OTHER:-fallback}} |
Add the extension annotation to your protobuf field:
import "atframe/atapp_conf.proto";
message my_config {
string endpoint = 1
[(atframework.atapp.protocol.CONFIGURE) = { enable_expression: true }];
map<string, string> label = 2
[(atframework.atapp.protocol.CONFIGURE) = { enable_expression: true }];
}
For map fields, both key and value are expanded.
atapp:
metadata:
label:
app.kubernetes.io/name: "${APP_NAME:-my-service}"
service_subset: "${SUBSET:-${ZONE:-default}}"
bus:
listen:
- "ipv4://0.0.0.0:${LISTEN_PORT:-12345}"
log:
level: "${LOG_LEVEL:-info}"
.conf[atapp.metadata.label]
app.kubernetes.io/name=${APP_NAME:-my-service}
[atapp.bus]
listen=ipv4://0.0.0.0:${LISTEN_PORT:-12345}
For full syntax rules, C++ API, and integration details, see the libatapp skill:
atframework/libatapp/.agents/skills/configure-expression/SKILL.md