Skip to content

Instantly share code, notes, and snippets.

View chearmstrong's full-sized avatar
🏠
Working from home

Ché Armstrong chearmstrong

🏠
Working from home
View GitHub Profile
@chearmstrong
chearmstrong / README.md
Created May 12, 2026 19:32
Shared local skills directory

Advanced: shared local skills directory

If you use multiple coding agents locally, you may want one shared place for personal skills instead of maintaining separate copies for Claude, Copilot, and other tools.

One approach is to create a shared ~/.agents folder and symlink each tool-specific skills directory to it.

This gives you a single source of truth:

~/.agents/
@chearmstrong
chearmstrong / README.md
Last active May 13, 2026 11:43
execute-plan-with-gates

execute-plan-with-gates

A reusable Agent Skill for executing implementation plans with optional approval gates.

Use it when you want an AI coding agent to read an implementation plan, understand the phases, implement methodically, verify changes, run a peer-review pass, and optionally stop after each phase for approval before committing or continuing.

This is useful for larger coding-agent tasks where you want more control than “just implement the plan”.

What this skill does

@chearmstrong
chearmstrong / rotate.js
Last active June 19, 2020 10:58
Rotate a matrix.
const rotate = (matrix) => {
const n = matrix.length - 1
const result = matrix.map((row, i) => row.map((val, j) => matrix[n - j][i]))
return [...result]
};
@chearmstrong
chearmstrong / local-aws-xray.js
Last active May 19, 2020 13:11
Simple wrapper utility for AWS X-RAY SDK. Allows you to easily test and run your code locally, without X-Ray.
/**
* Simple wrapper utility for AWS X-RAY SDK. Allows you to easily test and run your code
* locally, without X-Ray. To use X-Ray on your deployed environment, just set the
* `XRAY_TRACING` to `true`.
*/
/**
* External dependencies.
*/
const __AWSXRay__ = require('aws-xray-sdk')
@chearmstrong
chearmstrong / and-or-js.md
Last active April 26, 2019 14:25
Logical and/or in JavaScript.

Examples of values produced by && and || in JavaScript:

"foo" && "bar"; // "bar"
"bar" && "foo"; // "foo"
"foo" && "";    // ""
""    && "foo"; // ""

Keybase proof

I hereby claim:

  • I am chearmstrong on github.
  • I am chearmstrong (https://keybase.io/chearmstrong) on keybase.
  • I have a public key ASARXLOC5yvp9zYF-i8CTZb8NTLiYmvS2GJgRRj2IXPEHgo

To claim this, I am signing this object:

@chearmstrong
chearmstrong / removeDups.js
Created March 23, 2018 10:25
Remove duplicates from array using ES6 Set and Spread.
const arrWithDups = [1, 2, 1, 2, 3, 4, 5, 4, 2, 1, 3, 6, 6];
const arrFiltered = [...new Set(arrWithDups)];
console.log(arrFiltered); // [1, 2, 3, 4, 5, 6]
@chearmstrong
chearmstrong / balancedParenthesis.js
Created February 15, 2018 08:00
Validate that the parenthesis are balanced for a given string.
const balancedParens = (str) => {
const stack = [];
const open = { '{': '}', '[': ']', '(': ')' };
const closed = { '}': true, ']': true, ')': true };
for (let i = 0; i < str.length; i ++) {
const chr = str[i];
if (open[chr]) {
stack.push(chr);
@chearmstrong
chearmstrong / fiboReturn.js
Created February 14, 2018 07:53
Return the n-th number in the fibonacci sequence.
const fibo = (num) => {
const seq = [0, 1];
if (num <=2) {
return 1;
}
for (let i = 2; i <= num; i++) {
seq[i] = seq[i-1] + seq[i-2];
}
@chearmstrong
chearmstrong / fiboLog.js
Last active February 15, 2018 08:03
Log the first X fibonacci numbers.
const fib = (num) => {
let a = 0;
let b = 1;
let c;
for (let i = 3; i < num; i++) {
c = a + b;
a = b;
b = c;