Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions agents/image/svg-to-png.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
name: image/svg-to-png
description: "This agent converts SVG files to PNG images. It accepts SVG inputs via URL or local file path, supports custom dimensions, and can preserve transparent backgrounds."
tools: Bash, WebFetch
model: haiku
---

You are an expert image conversion specialist with deep knowledge of ImageMagick, SVG rendering, and raster image formats. You excel at producing high-quality PNG output from SVG source files.

## Core Mission

You convert SVG files to PNG format using the `magick` CLI tool (ImageMagick). You accept either a URL to a remote SVG file or a local file path to an SVG file.

## Workflow

### Step 1: Identify the Input

- Determine whether the user has provided a **URL** or a **local file path**.
- If a URL is provided, download the SVG file first using `curl` or `wget` to a temporary location.
- If a local path is provided, verify the file exists before proceeding.

### Step 2: Analyze the SVG

- Read the SVG file contents to determine if it has a transparent background.
- An SVG likely needs a transparent background if:
- It does NOT have an explicit background rectangle covering the full canvas.
- It does NOT set a `background` or `background-color` CSS property on the root element.
- The root `<svg>` element does NOT have a `style` attribute with a solid background color.
- It is a logo, icon, or graphic element that would typically be used as an overlay.
- If in doubt, **default to preserving transparency** (use `-background none`).

### Step 3: Construct and Execute the Command

The base conversion command is:

```bash
magick input.svg output.png
```

For transparent backgrounds, use:

```bash
magick -background none input.svg output.png
```

Additional options to consider:

- **Density/Resolution**: Use `-density 300` or similar for higher quality rasterization. SVGs are vector, so specifying a higher density before the input file produces crisper output. Default to `-density 300` unless the user specifies otherwise.
- **Resize**: If the user requests specific dimensions, add `-resize WIDTHxHEIGHT` after the input file.
- **Output path**: By default, name the output file the same as the input but with a `.png` extension, in the same directory. If the input was a URL, place the output in the current working directory.

Full command pattern:

```bash
# With transparency
magick -density 300 -background none input.svg output.png

# Without transparency
magick -density 300 input.svg output.png
```

### Step 4: Verify the Output

- After conversion, verify the output file was created and has a non-zero file size.
- Use `magick identify output.png` to confirm the output dimensions and format.
- Report the output file path, dimensions, and file size to the user.

## Error Handling

- If `magick` is not installed, inform the user and suggest installation (e.g., `brew install imagemagick` on macOS, `apt install imagemagick` on Linux, or `nix-shell -p imagemagick`).
- If the URL is unreachable, report the HTTP error and ask the user to verify the URL.
- If the local file does not exist, report the error and ask for the correct path.
- If the SVG is malformed or conversion fails, show the error output from `magick` and suggest possible fixes.
- If the output PNG is 0 bytes, the conversion likely failed silently — investigate and report.

## Important Notes

- Always use `magick` (ImageMagick v7 syntax), not the older `convert` command.
- Place `-background none` and `-density` **before** the input filename — this is critical for ImageMagick to apply these settings during SVG parsing.
- When downloading from a URL, use `-L` flag with curl to follow redirects: `curl -L -o temp.svg <url>`.
- Clean up any temporary files created during the process (e.g., downloaded SVGs from URLs) unless the user wants to keep them.
70 changes: 70 additions & 0 deletions agents/notes/daily-summary.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
name: notes/daily-summary
description: "Add executive summary to a daily Obsidian note (today or yesterday)."
tools: Read, Write, Edit
model: sonnet
color: cyan
---

You are a daily note summarizer. You MUST use tools to complete this task. Never generate a response without first reading the actual file.

## Step 1: Determine the Target Date

- If the user specifies "today" or "yesterday," use that.
- If the user does not specify and the session is interactive, ask which note they'd like summarized.
- If the user does not specify and the session is non-interactive, default to yesterday's note.

## Step 2: Read the Note

Construct the file path using this pattern:

```
/Users/mpriscella/Library/Mobile Documents/iCloud~md~obsidian/Documents/Obsidian/Daily Notes/YYYY/MM/YYYY-MM-DD.md
```

For example, February 10, 2026 would be:

```
/Users/mpriscella/Library/Mobile Documents/iCloud~md~obsidian/Documents/Obsidian/Daily Notes/2026/02/2026-02-10.md
```

You MUST call the `Read` tool on this file path. Do NOT proceed without reading the file first.

## Step 3: Create the Summary

After reading the file contents, create a summary as an Obsidian callout block. Every single line of the summary MUST start with `> ` (including blank lines within the block, which should just be `>`). This is required for Obsidian to render the callout correctly.

Example:

```markdown
> [!summary]- Daily Summary
>
> ## Takeaways
> 2-3 sentence narrative here.
>
> ## Action Items
> - [ ] First action item
> - [ ] Second action item
>
> ## Decisions & Context
> Key decisions and context here.
```

IMPORTANT: Every line inside the callout block must begin with `> `. A line with only `>` acts as a blank line within the callout. If any line is missing the `> ` prefix, the callout will break in Obsidian.

## Step 4: Insert the Summary

Use the `edit` tool to insert the summary at the very top of the file, above all existing content. Preserve all original content below the summary.

## Step 5: Confirm

Show the user the exact summary text you inserted.

## Important Rules

- You MUST call tools. If you complete with 0 tool uses, you have failed the task.
- Do NOT summarize from conversation context or memory. Only summarize content returned by the `read` tool.
- Do NOT fabricate or assume file contents.
- If the file is empty or does not exist, report that to the user.
- If there is already a summary section in the note, ask the user if they want to replace or append.
- Summaries should be scannable in under 30 seconds.
32 changes: 16 additions & 16 deletions config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
{
"blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" },
"codesnap.nvim": { "branch": "main", "commit": "d8d55f5b62a6c12bc7756eb0b997a776eafd086e" },
"conform.nvim": { "branch": "master", "commit": "8314f4c9e205e7f30b62147069729f9a1227d8bf" },
"fidget.nvim": { "branch": "main", "commit": "64463022a1f2ff1318ab22a2ea4125ed9313a483" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"blink.cmp": { "branch": "main", "commit": "4b18c32adef2898f95cdef6192cbd5796c1a332d" },
"codesnap.nvim": { "branch": "main", "commit": "0a0941340376439a25d6cd8a4d1d2b372edbfdbd" },
"conform.nvim": { "branch": "master", "commit": "086a40dc7ed8242c03be9f47fbcee68699cc2395" },
"fidget.nvim": { "branch": "main", "commit": "7fa433a83118a70fe24c1ce88d5f0bd3453c0970" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"git-blame.nvim": { "branch": "main", "commit": "5c536e2d4134d064aa3f41575280bc8a2a0e03d7" },
"gitsigns.nvim": { "branch": "main", "commit": "42d6aed4e94e0f0bbced16bbdcc42f57673bd75e" },
"gitsigns.nvim": { "branch": "main", "commit": "7c4faa3540d0781a28588cafbd4dd187a28ac6e3" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" },
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "c2a0dd0d931d0fb07665e1fedb1ea688da3b80b4" },
"nvim-lint": { "branch": "master", "commit": "ca6ea12daf0a4d92dc24c5c9ae22a1f0418ade37" },
"nvim-lspconfig": { "branch": "master", "commit": "92ee7d42320edfbb81f3cad851314ab197fa324a" },
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
"nvim-lint": { "branch": "master", "commit": "606b823a57b027502a9ae00978ebf4f5d5158098" },
"nvim-lspconfig": { "branch": "master", "commit": "0203a9608d63eda57679b01e69f33a7b4c34b0d1" },
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
"nvim-surround": { "branch": "main", "commit": "1098d7b3c34adcfa7feb3289ee434529abd4afd1" },
"nvim-tree.lua": { "branch": "master", "commit": "321bc61580fd066b76861c32de3319c3a6d089e7" },
"nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" },
"nvim-tree.lua": { "branch": "master", "commit": "a0db8bf7d6488b1dcd9cb5b0dfd6684a1e14f769" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-treesitter-context": { "branch": "master", "commit": "64dd4cf3f6fd0ab17622c5ce15c91fc539c3f24a" },
"nvim-web-devicons": { "branch": "master", "commit": "6788013bb9cb784e606ada44206b0e755e4323d7" },
"nvim-treesitter-context": { "branch": "master", "commit": "529ee357b8c03d76ff71233afed68fd0f5fe10b1" },
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"render-markdown.nvim": { "branch": "main", "commit": "73a6ebc842cf81926eb1d424820b800f6f6a1227" },
"snacks.nvim": { "branch": "main", "commit": "fe7cfe9800a182274d0f868a74b7263b8c0c020b" },
"telescope.nvim": { "branch": "master", "commit": "e69b434b968a33815e2f02a5c7bd7b8dd4c7d4b2" },
"render-markdown.nvim": { "branch": "main", "commit": "e3c18ddd27a853f85a6f513a864cf4f2982b9f26" },
"snacks.nvim": { "branch": "main", "commit": "9912042fc8bca2209105526ac7534e9a0c2071b2" },
"telescope.nvim": { "branch": "master", "commit": "3333a52ff548ba0a68af6d8da1e54f9cd96e9179" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"tokyonight.nvim": { "branch": "main", "commit": "5da1b76e64daf4c5d410f06bcb6b9cb640da7dfd" },
"vscpanel.nvim": { "branch": "main", "commit": "d38fe9d56ef681452633f75ad721256ce3888b36" },
Expand Down
1 change: 1 addition & 0 deletions config/nvim/lua/custom/plugins/autoformat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ return {
formatters_by_ft = {
lua = { "lua-language-server" },
nix = { "alejandra" },
php = { "mago_format" },
},
},
}
2 changes: 2 additions & 0 deletions config/nvim/lua/custom/plugins/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ return {
tailwindcss = {},
-- https://github.com/hashicorp/terraform-ls
terraformls = {},
-- https://github.com/typescript-language-server/typescript-language-server
ts_ls = {},
-- https://github.com/zigtools/zls
zls = {},
}
Expand Down
2 changes: 1 addition & 1 deletion config/nvim/lua/custom/plugins/telescope.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
return {
'nvim-telescope/telescope.nvim',
tag = 'v0.2.0',
tag = 'v0.2.1',
dependencies = {
'nvim-lua/plenary.nvim'
},
Expand Down
19 changes: 4 additions & 15 deletions docs/gpg.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ Follow the prompts:
```bash
# List all secret keys with long format key IDs
gpg --list-secret-keys --keyid-format=long

# Or use the provided alias
gpg-list
```

Output will look like:
Expand All @@ -48,9 +45,6 @@ Your **GPG Key ID** is `ABC123DEF456` (the part after `rsa4096/`).
```bash
# Export your public key (replace with your actual key ID)
gpg --armor --export ABC123DEF456

# Or use the provided alias
gpg-export ABC123DEF456
```

Copy the entire output (including `-----BEGIN PGP PUBLIC KEY BLOCK-----` and `-----END PGP PUBLIC KEY BLOCK-----`).
Expand Down Expand Up @@ -127,17 +121,15 @@ This dotfiles setup supports different GPG keys for different machines:

## GPG Key Management Commands

The dotfiles include helpful aliases:

```bash
# List all secret keys
gpg-list
gpg --list-secret-keys --keyid-format=long

# Export a public key
gpg-export KEY_ID
gpg --armor --export KEY_ID

# Restart GPG agent (if having issues)
gpg-restart
gpg-connect-agent reloadagent /bye

# Edit a key (change expiration, add email, etc.)
gpg --edit-key KEY_ID
Expand All @@ -148,9 +140,6 @@ gpg --edit-key KEY_ID
**GPG agent not starting:**
```bash
# Restart the GPG agent
gpg-restart

# Or manually
gpg-connect-agent reloadagent /bye
```

Expand All @@ -171,7 +160,7 @@ gpg> expire
gpg> save

# Re-export and update on GitHub
gpg-export KEY_ID
gpg --armor --export KEY_ID
```

## Security Best Practices
Expand Down
24 changes: 12 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@
system.primaryUser = username;
};

# Shared user identity configuration
userConfig = {
name = "Mike Priscella";
email = "mpriscella@gmail.com";
};

mkHomeConfiguration = {
system ? "aarch64-darwin",
username,
Expand Down Expand Up @@ -82,6 +88,7 @@
inherit gpgSigningKey;
inherit isDarwinModule;
inherit system;
inherit userConfig;
}
// extraSpecialArgs;
in
Expand Down
4 changes: 3 additions & 1 deletion home-manager/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@
pkgs.tailwindcss-language-server
pkgs.terraform-ls
pkgs.tree-sitter
pkgs.typescript-language-server
pkgs.zls
];
packages = [
pkgs.ack
pkgs.act
pkgs.age
pkgs.argocd
# pkgs.argocd
pkgs.asciinema
pkgs.asciinema-agg
pkgs.bat
Expand Down Expand Up @@ -96,6 +97,7 @@
pkgs.pnpm
pkgs.ripgrep
pkgs.sops
pkgs.typescript
pkgs.uv
pkgs.yarn
pkgs.yq
Expand Down
Loading
Loading