Skip to content

Instantly share code, notes, and snippets.

@olvnikon
olvnikon / review-branch_SKILL.md
Last active June 11, 2026 10:56
review-branch skill

name: review-branch description: Use when reviewing the current branch as a whole against a base branch. Reads repository/package instructions, generates the branch diff, analyzes the full change, and writes review comments to a Markdown file. Does not refactor or modify source code. argument-hint: "[optional base branch, output file, or review focus]"

Review Branch

Review the current branch as one coherent change.

@olvnikon
olvnikon / write-package-instructions_SKILL.md
Last active June 11, 2026 10:45
Technical context SKILLs

name: write-package-instructions description: Use when creating or improving package-specific Copilot instructions for a monorepo package, app, library, shared module, or legacy package. argument-hint: "[package path, package name, or package-specific goal]"

Write Package Instructions

Create or improve package-specific Copilot instructions under .github/instructions/*.instructions.md.

@olvnikon
olvnikon / plugin-extension-points.tsx
Last active May 28, 2026 08:03
Plugin / Extension Points
// dashboard.extensions.ts
export type DashboardWidget = {
id: string;
title: string;
render: () => React.ReactNode;
};
// feature-pending-approvals/dashboardWidget.tsx
export const pendingApprovalsWidget: DashboardWidget = {
id: 'pending-approvals',
@olvnikon
olvnikon / function-to-window.js
Created October 6, 2017 11:24
[AST + JSShiftCode] - "function name" to "window.name = function"
function isOnTheBody(path) {
return path.scope.parent.isGlobal;
}
function transform(j, path) {
const propName = path.value.id.name;
const params = path.value.params;
const body = path.value.body;
j(path).replaceWith(
@olvnikon
olvnikon / directive-to-component-transform.js
Last active October 6, 2017 11:30
[AST + JSShiftCode] - AngularJS 1.x directive to component
const DIRECTIVE_TO_COMPONENT = {
scope: "bindings"
};
const DEPRECATED_PROPS = ["restrict", "replace", "bindToController"];
const DIRECTIVE_UNIQUE_PROPS = ["link", "compile", "multiElement", "priority", "templateNamespace", "terminal"];
function transform(j, path) {
const directiveDeclaration = path.value.arguments[1];
const directiveProperties = directiveDeclaration.body.body[0].argument.properties;
const newProps = directiveProperties.filter(prop => !DEPRECATED_PROPS.includes(prop.key.name));
@olvnikon
olvnikon / 1-one-row-expressions.js
Last active April 16, 2019 06:48
Javascript tricky questions. Check yourself. Or destroy any interviewee.
// https://jsfiddle.net/vk35ok2o/50/
console.log('typeof 1/0 => ', typeof 1/0);
console.log('typeof (1/0) => ', typeof (1/0));
console.log('1/0 => ', 1/0);
console.log('"Hello" * 2 => ', "Hello" * 2);
console.log('typeof ("Hello" * 2) => ', typeof ("Hello" * 2));
console.log('typeof "Hello" * 2 => ', typeof "Hello" * 2);
console.log('typeof undefined => ', typeof undefined);
console.log('typeof null => ', typeof null);
console.log('typeof function(){} => ', typeof function(){});