fig
Expert guidance for Amazon Q Developer (formerly Fig), the terminal tool that provides IDE-style autocomplete, AI chat, and CLI builder capabilities. Helps developers create custom completion specs, build CLI tools with autocomplete, and configure terminal productivity features.
What this skill does
# Amazon Q (formerly Fig) โ Terminal Autocomplete & CLI Tools
## Overview
Amazon Q Developer (formerly Fig), the terminal tool that provides IDE-style autocomplete, AI chat, and CLI builder capabilities. Helps developers create custom completion specs, build CLI tools with autocomplete, and configure terminal productivity features.
## Instructions
### Custom Completion Specs
Define autocomplete for your own CLI tools:
```typescript
// src/my-cli.ts โ Completion spec for a custom CLI tool
const completionSpec: Fig.Spec = {
name: "deploy",
description: "Deploy services to cloud infrastructure",
subcommands: [
{
name: "create",
description: "Create a new deployment",
args: {
name: "service",
description: "Service name to deploy",
// Dynamic suggestions from an API or command output
generators: {
script: ["bash", "-c", "ls services/"],
postProcess: (output) =>
output.split("\n").filter(Boolean).map((name) => ({
name,
description: `Deploy ${name} service`,
icon: "๐ฆ",
})),
},
},
options: [
{
name: ["--env", "-e"],
description: "Target environment",
args: {
name: "environment",
suggestions: [
{ name: "staging", description: "Staging environment", icon: "๐ก" },
{ name: "production", description: "Production environment", icon: "๐ด" },
{ name: "development", description: "Development environment", icon: "๐ข" },
],
},
isRequired: true,
},
{
name: ["--replicas", "-r"],
description: "Number of replicas",
args: { name: "count", default: "2" },
},
{
name: "--dry-run",
description: "Preview changes without deploying",
},
{
name: ["--tag", "-t"],
description: "Docker image tag",
args: {
name: "tag",
generators: {
// Suggest recent git tags
script: ["bash", "-c", "git tag --sort=-version:refname | head -10"],
postProcess: (output) =>
output.split("\n").filter(Boolean).map((tag) => ({
name: tag,
icon: "๐ท๏ธ",
})),
},
},
},
],
},
{
name: "status",
description: "Check deployment status",
args: {
name: "service",
isOptional: true,
generators: {
script: ["bash", "-c", "kubectl get deployments -o jsonpath='{.items[*].metadata.name}'"],
splitOn: " ",
},
},
options: [
{
name: ["--watch", "-w"],
description: "Watch status in real-time",
},
{
name: "--format",
description: "Output format",
args: {
suggestions: ["table", "json", "yaml"],
},
},
],
},
{
name: "rollback",
description: "Rollback to previous version",
isDangerous: true, // Shows warning icon
args: {
name: "service",
generators: {
script: ["bash", "-c", "kubectl get deployments -o jsonpath='{.items[*].metadata.name}'"],
splitOn: " ",
},
},
options: [
{
name: "--revision",
description: "Specific revision to rollback to",
args: {
name: "revision",
generators: {
// Dynamic: list revision history for the selected service
script: ({ tokens }) => {
const service = tokens[2]; // deploy rollback <service>
return ["bash", "-c", `kubectl rollout history deployment/${service} | tail -n +3 | awk '{print $1}'`];
},
postProcess: (output) =>
output.split("\n").filter(Boolean).map((rev) => ({
name: rev,
description: `Revision ${rev}`,
})),
},
},
},
],
},
{
name: "logs",
description: "View deployment logs",
args: {
name: "service",
generators: {
script: ["bash", "-c", "kubectl get deployments -o jsonpath='{.items[*].metadata.name}'"],
splitOn: " ",
},
},
options: [
{ name: ["--follow", "-f"], description: "Stream logs in real-time" },
{ name: "--since", description: "Show logs since duration", args: { suggestions: ["1m", "5m", "1h", "24h"] } },
{ name: "--tail", description: "Number of recent lines", args: { name: "lines", default: "100" } },
],
},
],
options: [
{
name: ["--verbose", "-v"],
description: "Enable verbose output",
isPersistent: true, // Available on all subcommands
},
{
name: "--config",
description: "Path to config file",
isPersistent: true,
args: { template: "filepaths" }, // File path autocomplete
},
],
};
export default completionSpec;
```
### Dotfile Scripts
Create portable shell scripts that run across machines:
```bash
# ~/.fig/scripts/setup-project.sh โ Reusable project setup script
#!/bin/bash
# Fig script: Initialize a new TypeScript project with standard tooling
set -euo pipefail
PROJECT_NAME=${1:?"Usage: fig run setup-project <name>"}
echo "๐ Creating project: $PROJECT_NAME"
mkdir -p "$PROJECT_NAME" && cd "$PROJECT_NAME"
# Initialize with package.json
cat > package.json << EOF
{
"name": "$PROJECT_NAME",
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "tsx watch src/index.ts",
"build": "tsup src/index.ts",
"lint": "biome check .",
"format": "biome format --write .",
"test": "vitest"
}
}
EOF
# Install dependencies
pnpm install typescript tsx tsup vitest @biomejs/biome
# TypeScript config
cat > tsconfig.json << 'EOF'
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"moduleResolution": "bundler",
"strict": true,
"outDir": "dist",
"rootDir": "src",
"declaration": true
},
"include": ["src"]
}
EOF
# Biome config
cat > biome.json << 'EOF'
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"organizeImports": { "enabled": true },
"linter": { "enabled": true },
"formatter": { "indentStyle": "space", "indentWidth": 2 }
}
EOF
# Create entry point
mkdir -p src
cat > src/index.ts << 'EOF'
console.log("Hello from $PROJECT_NAME!");
EOF
# Git init
git init
echo "node_modules/\ndist/\n.env" > .gitignore
echo "โ
Project $PROJECT_NAME created!"
echo " cd $PROJECT_NAME && pnpm dev"
```
### SSH Integration
Auto-complete for remote servers:
```typescript
// src/ssh-hosts.ts โ Dynamic SSH host suggestions
const sshSpec: Fig.Spec = {
name: "ssh",
args: {
name: "destination",
generators: {
// Parse SSH config for host suggestions
script: ["bash", "-c", `
grep "^Host " ~/.ssh/config 2>/dev/null | awk '{print $2}' | grep -v '*'
`],
postProcess: (output) =>
output.split("\n").filter(Boolean).map((host) => ({
name: host,
description: "SSH host from config",
icon: "๐ฅ๏ธ",
priority: 80,
})),
},
},
};
```
## Installation
```bash
# macOS
brew install amazon-q
# Or direct download from https://aws.amazon.com/q/developer/
# Login and configure
q login
q settings
```
## Examples
### Example 1: Setting up Fig with a custom configuration
**User request:**
```
I just installed Fig. Help me configure it for my TypeScript + React workflow with my preferred keybindings.
```
The agent creates the configuration file with TypeScript-aware settings, configures relevant plugins/extensions for React development, sets up keyboard shortcuts matching the user's preferences, and verifies the setup works corRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.