Amazon Q (formerly Fig) — Terminal Autocomplete & CLI Tools

## Overview

25 stars

Best use case

Amazon Q (formerly Fig) — Terminal Autocomplete & CLI Tools is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

## Overview

Teams using Amazon Q (formerly Fig) — Terminal Autocomplete & CLI Tools should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/fig/SKILL.md --create-dirs "https://raw.githubusercontent.com/ComeOnOliver/skillshub/main/skills/TerminalSkills/skills/fig/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/fig/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Amazon Q (formerly Fig) — Terminal Autocomplete & CLI Tools Compares

Feature / AgentAmazon Q (formerly Fig) — Terminal Autocomplete & CLI ToolsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

## Overview

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 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 correctly.

### Example 2: Extending Fig with custom functionality

**User request:**

```
I want to add a custom dotfile scripts to Fig. How do I build one?
```

The agent scaffolds the extension/plugin project, implements the core functionality following Fig's API patterns, adds configuration options, and provides testing instructions to verify it works end-to-end.


## Guidelines

1. **Generators for dynamic suggestions** — Use shell scripts to generate suggestions from live data (git branches, k8s resources, file lists)
2. **Mark dangerous commands** — Set `isDangerous: true` on destructive subcommands (delete, drop, rollback)
3. **Use templates for common arg types** — `template: "filepaths"` for file args, `template: "folders"` for directories
4. **Persistent options** — Use `isPersistent: true` for flags like `--verbose` that apply to all subcommands
5. **Icons and descriptions** — Add icons and descriptions to suggestions; visual cues speed up selection
6. **Publish to the spec repo** — Share your completion specs via the fig/autocomplete GitHub repo for community use
7. **Test with `fig settings developer.enabled true`** — Enable developer mode for spec debugging and hot reload
8. **Dotfile scripts for portability** — Store setup scripts in `~/.fig/scripts/`; they sync across machines via Fig's dotfile management

Related Skills

mermaid-tools

25
from ComeOnOliver/skillshub

Extracts Mermaid diagrams from markdown files and generates high-quality PNG images using bundled scripts. Activates when working with Mermaid diagrams, converting diagrams to PNG, extracting diagrams from markdown, or processing markdown files with embedded Mermaid code.

markdown-tools

25
from ComeOnOliver/skillshub

Converts documents to markdown with multi-tool orchestration for best quality. Supports Quick Mode (fast, single tool) and Heavy Mode (best quality, multi-tool merge). Use when converting PDF/DOCX/PPTX files to markdown, extracting images from documents, validating conversion quality, or needing LLM-optimized document output.

terminal-session

25
from ComeOnOliver/skillshub

tmux 持久化终端会话控制。通过向 tmux 发送按键、读取输出,管理 Claude Code、Codex、SSH 等长时间运行的交互式进程。跨多轮对话保持进程状态。需预装 tmux(Linux/macOS 默认提供;Windows 用户需 WSL2)。

no-tools

25
from ComeOnOliver/skillshub

Instructions only skill

security-scanning-tools

25
from ComeOnOliver/skillshub

This skill should be used when the user asks to "perform vulnerability scanning", "scan networks for open ports", "assess web application security", "scan wireless networks", "detect malware", "check cloud security", or "evaluate system compliance". It provides comprehensive guidance on security scanning tools and methodologies.

scanning-tools

25
from ComeOnOliver/skillshub

This skill should be used when the user asks to "perform vulnerability scanning", "scan networks for open ports", "assess web application security", "scan wireless networks", "detec...

red-team-tools

25
from ComeOnOliver/skillshub

This skill should be used when the user asks to "follow red team methodology", "perform bug bounty hunting", "automate reconnaissance", "hunt for XSS vulnerabilities", "enumerate su...

red-team-tools-and-methodology

25
from ComeOnOliver/skillshub

This skill should be used when the user asks to "follow red team methodology", "perform bug bounty hunting", "automate reconnaissance", "hunt for XSS vulnerabilities", "enumerate subdomains", or needs security researcher techniques and tool configurations from top bug bounty hunters.

n8n-mcp-tools-expert

25
from ComeOnOliver/skillshub

Expert guide for using n8n-mcp MCP tools effectively. Use when searching for nodes, validating configurations, accessing templates, managing workflows, or using any n8n-mcp tool. Provides tool selection guidance, parameter formats, and common patterns.

tools-ui

25
from ComeOnOliver/skillshub

Tool lifecycle UI components for React/Next.js from ui.inference.sh. Display tool calls: pending, progress, approval required, results. Capabilities: tool status, progress indicators, approval flows, results display. Use for: showing agent tool calls, human-in-the-loop approvals, tool output. Triggers: tool ui, tool calls, tool status, tool approval, tool results, agent tools, mcp tools ui, function calling ui, tool lifecycle, tool pending

agent-tools

25
from ComeOnOliver/skillshub

Run 150+ AI apps via inference.sh CLI - image generation, video creation, LLMs, search, 3D, Twitter automation. Models: FLUX, Veo, Gemini, Grok, Claude, Seedance, OmniHuman, Tavily, Exa, OpenRouter, and many more. Use when running AI apps, generating images/videos, calling LLMs, web search, or automating Twitter. Triggers: inference.sh, infsh, ai model, run ai, serverless ai, ai api, flux, veo, claude api, image generation, video generation, openrouter, tavily, exa search, twitter api, grok

receipt-scanning-tools

25
from ComeOnOliver/skillshub

This skill helps you work with the receipt scanning tools in the nonprofit_finance_db project. It includes manual entry tools, automated OCR scanning, and database integration for tracking receipts...