rshade/finfocus / agent-skills/finfocus-analyzer-setup
finfocus-analyzer-setup
UnverifiedInstall and configure FinFocus as a Pulumi Analyzer for inline cost estimation during pulumi preview. Use when setting up the analyzer, configuring the policy pack, debugging analyzer issues, or enabling zero-click cost estimates in Pulumi workflows. Triggers on: "set up analyzer", "configure analyzer", "install analyzer", "Pulumi preview costs", "inline cost estimates", "policy pack setup", "analyzer integration", "zero-click cost estimation", "analyzer check", or any task involving finfocus Pulumi Analyzer configuration.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 3.7 KB |
| finfocus-analyzer-setup.skill | binary | 3.7 KB |
| references/troubleshooting.md | markdown | 4.2 KB |
references/troubleshooting.md
View on GitHub# Analyzer Troubleshooting
## no language plugin 'pulumi-language-finfocus'
**Cause:** Pulumi 3.270.0 and later starts `pulumi-language-finfocus`. An older
pack has only `pulumi-analyzer-policy-finfocus`.
```text
no language plugin 'pulumi-language-finfocus' found in the workspace or on your $PATH
```
Pulumi may also print a 404 while looking up a download named `pulumi-finfocus`
(`could not find latest version`).
```bash
finfocus analyzer install
export PATH="$HOME/.finfocus/analyzer:$PATH"
```
## "could not start policy pack"
**Cause:** The pack directory is not on PATH, so Pulumi cannot start
`pulumi-language-finfocus` (3.270.0 and later) or
`pulumi-analyzer-policy-finfocus` (earlier releases).
```bash
# Fix: add policy pack dir to PATH
export PATH="$HOME/.finfocus/analyzer:$PATH"
# Verify
which pulumi-language-finfocus
which pulumi-analyzer-policy-finfocus
```
Pulumi searches PATH for the entry it starts. Having the files only in the
policy pack directory is not sufficient unless that directory is on PATH.
## No cost diagnostics appear
**Causes and checks:**
1. `PulumiPolicy.yaml` missing or malformed:
```bash
cat ~/.finfocus/analyzer/PulumiPolicy.yaml
# Must contain: runtime: finfocus
```
2. Wrong `--policy-pack` path:
```bash
pulumi preview --policy-pack ~/.finfocus/analyzer
```
3. No cost plugins installed:
```bash
finfocus plugin list
```
4. Debug with verbose logging:
```bash
FINFOCUS_LOG_LEVEL=debug pulumi preview --policy-pack ~/.finfocus/analyzer
```
## Version mismatch after upgrade
**Cause:** Installed analyzer binary points to old finfocus version.
```bash
finfocus analyzer install --force
```
## gRPC smoke test fails
**Causes:**
- Port binding failure (another process using the port)
- Plugin loading error during `analyzer serve`
- Binary corruption
**Fix:**
```bash
# Manual smoke test — should print a port number and wait
finfocus analyzer serve
# Reinstall
finfocus analyzer install --force
```
## Plugin isolation in analyzer mode
Control which plugins load when running as an analyzer:
```yaml
# ~/.finfocus/config.hujson (keys shown in YAML form)
analyzer:
plugins:
aws-public:
enabled: true
some-other-plugin:
enabled: false
```
Or use `FINFOCUS_HOME` for full isolation:
```bash
mkdir -p ~/.finfocus/demo/plugins/aws-public/v0.1.5
ln -sf ~/.finfocus/plugins/aws-public/v0.1.5/finfocus-plugin-aws-public \
~/.finfocus/demo/plugins/aws-public/v0.1.5/finfocus-plugin-aws-public
FINFOCUS_HOME=~/.finfocus/demo pulumi preview --policy-pack ~/.finfocus/analyzer
```
**Note:** Directory-level symlinks are not supported (#750). Use file-level
symlinks only.
## Analyzer config tuning
```yaml
# ~/.finfocus/config.hujson (keys shown in YAML form)
analyzer:
timeout:
per_resource: 5s # Per-resource cost lookup timeout
total: 60s # Overall analysis timeout
warn_threshold: 30s # Log warning if analysis exceeds this
max_monthly_cost: 500.00 # Optional cost threshold
enforcement: advisory # Always advisory (never blocks)
```
**Environment variable overrides:**
| Variable | Purpose |
|----------|---------|
| `FINFOCUS_MAX_MONTHLY_COST` | Cost threshold override |
| `FINFOCUS_ENFORCEMENT` | Enforcement mode (advisory only — never blocks) |
| `FINFOCUS_HOME` | Override base directory (affects plugin loading) |
| `FINFOCUS_LOG_LEVEL` | Analyzer logging: debug, info, warn, error |
| `FINFOCUS_ANALYZER_MODE` | Set automatically by `analyzer serve` |
## Directory resolution
**Pulumi plugin dir:** `--target-dir` > `$PULUMI_HOME/plugins/` >
`~/.pulumi/plugins/`
**Policy pack dir:** `$FINFOCUS_HOME/analyzer/` > `~/.finfocus/analyzer/`
## Important: `analyzers:` in Pulumi.yaml
Adding `analyzers:` to `Pulumi.yaml` does **not** work for YAML-runtime
projects. Use the `--policy-pack` flag; Pulumi has no environment variable for
a local policy pack.
## Handshake protocol (advanced)
When Pulumi invokes the analyzer:
1. Pulumi 3.270.0 and later executes `pulumi-language-finfocus`. Earlier
releases execute `pulumi-analyzer-policy-finfocus`
2. Binary starts gRPC server on random TCP port
3. Prints ONLY the port number to stdout (single line)
4. Pulumi connects to `127.0.0.1:PORT` via gRPC
5. All logging goes to stderr exclusively
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |