Skip to content

Instantly share code, notes, and snippets.

View cniska's full-sized avatar
🎩
Coding

Christoffer Niska cniska

🎩
Coding
View GitHub Profile
@cniska
cniska / how-i-use-ai.md
Last active May 5, 2026 13:04
How I use AI

How I use AI

Why I'm writing this

AI is now part of how I write code every day, and the workflow I run has evolved into something specific enough to be worth describing. This post is the snapshot: how I work, what I've learned along the way, and the reasoning behind building my own coding agent.

How I work

I run Claude Code in the terminal almost every day at work — and Codex too, though less often. AI does the implementation, I direct and verify. The goal is to automate as much of my workflow as possible and partner with AI on the rest, so I can focus on building things instead of repeating the routine parts of the job.

@cniska
cniska / SKILL.md
Created April 27, 2026 11:08
Handoff Skill
name handoff
description Summarize the session and reset context to save costs. Use when the context is getting long or before switching focus.

Handoff

Summarize what matters, clear the noise, and continue without paying for stale tokens.

Workflow

@cniska
cniska / effects.ts
Created April 11, 2026 16:40
React Effects
import { type EffectCallback, useEffect, useRef } from "react";
/**
* Run an effect exactly once on mount. This is the only sanctioned way to
* call `useEffect` in chat-layer code — prefer derived state, event handlers,
* or render-time adjustments for everything else.
*/
export function useMountEffect(effect: EffectCallback): void {
const effectRef = useRef(effect);
effectRef.current = effect;
@cniska
cniska / check-commit-message.sh
Created April 9, 2026 18:47
Check Commit Message
#!/usr/bin/env bash
set -euo pipefail
# Validate a commit message against project conventions.
# Usage: check-commit-message.sh <subject> [body]
#
# Rules:
# - Conventional Commit format: type(scope): description
# - Allowed types: feat, fix, refactor, docs, test, chore
# - Single-line subject, no body
@cniska
cniska / coding-agents.md
Last active April 2, 2026 10:11
Coding Agent Landscape

Coding Agent Landscape

Updated April 2026

Open Source

Agent Category Lang Notes
Acolyte Terminal agent TS Local-first, lifecycle-driven, observable
Codex Terminal agent Rust OpenAI's agent, sandbox execution
@cniska
cniska / SKILL.md
Last active April 27, 2026 13:01
Plan Skill
name plan
description Design a feature or behavior change through dialogue. Use when asked to plan, scope, design, or break down work before coding.

Plan

Design a feature or behavior change through dialogue. The plan emerges from the conversation, not in isolation.

If an issue number is given, fetch it with gh issue view $ARGUMENTS and use it as the starting point.

@cniska
cniska / acolyte-benchmarks.md
Last active March 6, 2026 19:58
Acolyte Benchmarks

Acolyte Benchmarks

Measured comparisons of Acolyte against prominent open-source AI coding agents. All metrics are from source code analysis — no opinions, just counts.

Metrics extracted with benchmark.sh

Projects Compared

| Project | Language | Description | Source Lines | Files | Dependencies |

@cniska
cniska / 01-setup.md
Last active February 15, 2026 08:46
Codex Starter Kit

Setting Up Codex

Prerequisites

  • Codex installed
  • Recommended: install Codex via Homebrew for easy updates
  • GitHub CLI authenticated (gh auth login)
  • Copy config.toml to ~/.codex/config.toml

Quick Start

@cniska
cniska / 01-setup.md
Last active April 2, 2026 19:01
Claude Code Starter Kit

Setting Up Claude Code

Prerequisites

Quick Start

@cniska
cniska / 01-openapi.ts
Last active February 16, 2026 06:44
Express + Zod to OpenAPI
import {
OpenAPIRegistry,
OpenApiGeneratorV3,
RouteConfig,
ZodRequestBody,
extendZodWithOpenApi,
} from '@asteasolutions/zod-to-openapi';
import { OpenAPIObjectConfig } from '@asteasolutions/zod-to-openapi/dist/v3.0/openapi-generator';
import { Application, NextFunction, Request, RequestHandler, Response, Router } from 'express';
import fs from 'node:fs/promises';