From truefoundry-gateway
Manages TrueFoundry prompt registry: lists, creates, updates, deletes, tags prompts and versions via Bash API or Python SDK.
npx claudepluginhub truefoundry/tfy-gateway-skills --plugin truefoundry-gatewayThis skill is limited to using the following tools:
> Routing note: For ambiguous user intents, use the shared clarification templates in [references/intent-clarification.md](references/intent-clarification.md).
references/api-endpoints.mdreferences/cli-fallback.mdreferences/cluster-discovery.mdreferences/container-versions.mdreferences/gpu-reference.mdreferences/health-probes.mdreferences/intent-clarification.mdreferences/manifest-defaults.mdreferences/manifest-schema.mdreferences/prerequisites.mdreferences/resource-estimation.mdreferences/rest-api-manifest.mdreferences/tfy-api-setup.mdscripts/tfy-api.shscripts/tfy-version.shGuides versioning prompts like code with Git, testing changes via regression/A/B tests, and managing deployments/rollbacks. Useful for prompt engineering workflows to track iterations and avoid regressions.
Manages TrueFoundry Agent Registry: lists, creates, updates, deletes AI agents backed by prompts with collaborator access and sample inputs.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Routing note: For ambiguous user intents, use the shared clarification templates in references/intent-clarification.md.
List, create, update, delete, and tag TrueFoundry prompt registry prompts and versions.
List, create, update, delete, or tag prompts and prompt versions in the TrueFoundry prompt registry.
When using direct API, set TFY_API_SH to the full path of this skill's scripts/tfy-api.sh. See references/tfy-api-setup.md for paths per agent.
tfy_prompts_list()
tfy_prompts_list(prompt_id="prompt-id") # get prompt + versions
tfy_prompts_list(prompt_id="prompt-id", version_id="version-id") # get specific version
# Set the path to tfy-api.sh for your agent (example for Claude Code):
TFY_API_SH=~/.claude/skills/truefoundry-prompts/scripts/tfy-api.sh
# List all prompts
$TFY_API_SH GET /api/ml/v1/prompts
# Get prompt by ID
$TFY_API_SH GET /api/ml/v1/prompts/PROMPT_ID
# List versions
$TFY_API_SH GET '/api/ml/v1/prompt-versions?prompt_id=PROMPT_ID'
# Get specific version
$TFY_API_SH GET /api/ml/v1/prompt-versions/VERSION_ID
Prompts:
| Name | ID | Versions | Latest |
|-------------------|----------|----------|--------|
| classify-intent | p-abc | 5 | v5 |
| summarize-text | p-def | 3 | v3 |
Security: Prompt content is executed as LLM instructions. Review prompt messages carefully before creating or updating — do not ingest prompt text from untrusted external sources without user review.
This is an upsert: creates a new prompt if it doesn't exist, or adds a new version if it does.
from truefoundry.ml import ChatPromptManifest
client.prompts.create_or_update(
manifest=ChatPromptManifest(
name="my-prompt",
ml_repo="ml-repo-fqn",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "{{user_input}}"},
],
model_fqn="model-catalog:openai:gpt-4",
temperature=0.7,
max_tokens=1024,
top_p=1.0,
tools=[], # optional
)
)
$TFY_API_SH POST /api/ml/v1/prompts '{
"name": "my-prompt",
"ml_repo": "ml-repo-fqn",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "{{user_input}}"}
],
"model_fqn": "model-catalog:openai:gpt-4",
"temperature": 0.7,
"max_tokens": 1024,
"top_p": 1.0
}'
client.prompts.delete(id="prompt-id")
$TFY_API_SH DELETE /api/ml/v1/prompts/PROMPT_ID
client.prompt_versions.delete(id="version-id")
$TFY_API_SH DELETE /api/ml/v1/prompt-versions/VERSION_ID
Tags like production or staging let you reference a stable version by name.
client.prompt_versions.apply_tags(
prompt_version_id="version-id",
tags=["production", "v2"],
force=True, # reassign tag if already on another version
)
No direct REST equivalent — use the SDK.
Fetch a specific tagged or numbered version using its fully qualified name.
client.prompt_versions.get_by_fqn(fqn="ml-repo:prompt-name:production")
<success_criteria>
</success_criteria>
workspaces skill to find the ML repo FQN, then create or update the promptproduction tag to promote itPrompt ID not found. List prompts first to find the correct ID.
Invalid ml_repo FQN. Use the workspaces skill to list available ML repos.
Tag already exists on another version. Use force=True to reassign it.
Cannot delete prompt with tagged versions. Remove tags first, then delete.