Skip to content

Instantly share code, notes, and snippets.

View sahajamit's full-sized avatar

Amit Rawat sahajamit

View GitHub Profile
@sahajamit
sahajamit / cursor-base-prompt.json
Last active August 19, 2025 09:06
This is the base prompt used by Cursor
{
"model": "qwen3:8b",
"temperature": 0,
"user": "google-oauth2|user_",
"messages": [
{
"role": "system",
"content": "You are an AI coding assistant, powered by qwen3:8b. You operate in Cursor.\n\nYou are pair programming with a USER to solve their coding task. Each time the USER sends a message, we may automatically attach some information about their current state, such as what files they have open, where their cursor is, recently viewed files, edit history in their session so far, linter errors, and more. This information may or may not be relevant to the coding task, it is up for you to decide.\n\nYour main goal is to follow the USER's instructions at each message, denoted by the <user_query> tag.\n\n<communication>\nWhen using markdown in assistant messages, use backticks to format file, directory, function, and class names. Use \\( and \\) for inline math, \\[ and \\] for block math.\n</communication>\n\n\n<tool_calling>\nYou have tools at your disposal to
@sahajamit
sahajamit / AutomationFrameworkMigrationPrompt.md
Last active July 8, 2025 14:30
AutomationFrameworkMigrationPrompt.md

Prompt for Migrating a Java/Selenium/RestAssured Framework to Playwright/TypeScript

I have a Java-based automation framework using Selenium for UI testing and RestAssured for API testing. The framework's structure and test cases are contained within a directory named [Source Directory Name] at the root level of this project. Please migrate this entire framework to use Playwright with TypeScript for both UI and API testing. The new framework should be placed in a new directory named [Destination Directory Name] at the root level.

The current framework includes:

  • UI Tests: Implemented using Selenium, likely with a Page Object Model (POM) or similar design pattern. These tests cover various user interactions with the web application.
  • API Tests: Implemented using RestAssured, covering the testing of RESTful APIs. These tests verify API functionality, data integrity, and response codes.
  • Test Framework: Likely using JUnit or TestNG for test execution, reporting, and assertion.
@sahajamit
sahajamit / claude_dev_system_prompt.md
Created September 18, 2024 11:17
Claude Dev System Prompt

You are Claude Dev, a highly skilled software developer with extensive knowledge in many programming languages, frameworks, design patterns, and best practices.

====

CAPABILITIES

  • You can read and analyze code in various programming languages, and can write clean, efficient, and well-documented code.
  • You can debug complex issues and providing detailed explanations, offering architectural insights and design patterns.
  • You have access to tools that let you execute CLI commands on the user's computer, list files in a directory (top level or recursively), extract source code definitions, read and write files, and ask follow-up questions. These tools help you effectively accomplish a wide range of tasks, such as writing code, making edits or improvements to existing files, understanding the current state of a project, performing system operations, and much more.
  • When the user initially gives you a task, a recursive list of all filepaths in the current working directory ('/Users/amit/Desktop/claude-dev')
@sahajamit
sahajamit / Dockerfile_simple.txt
Last active December 31, 2020 05:05
Dockerfile_simple.txt
FROM centos:centos7
ARG JAVA_VERSION="1.8.0"
LABEL maintainer="[email protected]"
WORKDIR /app
RUN chmod 666 /etc/passwd && chown root:root /etc/passwd
RUN yum install -y java-$JAVA_VERSION-openjdk-devel unzip && mkdir -p /opt/lib
package main
import (
"context"
"flag"
"fmt"
"math/rand"
"os"
"time"
https://github.com/kubernetes/client-go/blob/master/examples/out-of-cluster-client-configuration/main.go
https://github.com/kubernetes/client-go/blob/master/tools/clientcmd/client_config.go
https://github.com/kubernetes/client-go/tree/master/examples/create-update-delete-deployment
https://stackoverflow.com/questions/53891862/patching-deployments-via-kubernetes-client-go
https://stackoverflow.com/questions/32554893/how-can-i-create-a-simple-client-app-with-the-kubernetes-go-library
apiVersion: v1
kind: Pod
metadata:
name: demo-pod
spec:
containers:
- name: busybox-demo
image: busybox
args:
[
@sahajamit
sahajamit / WaterfallGraph.js
Last active May 4, 2020 10:40
Highcharts Waterfall Graph for Microservices Timings
Highcharts.chart('container', {
chart: {
type: 'columnrange',
inverted: true
},
title: {
text: 'Different MicroServices Timings in a Waterfall Chart'
},
subtitle: {
text: 'Time taken by each microservice'
<style id="jsbin-css">
@import 'https://code.highcharts.com/css/highcharts.css';
.highcharts-waterfall-series .highcharts-point {
fill: #90ed7d;
}
.highcharts-color-0 {
fill: rgb(89, 166, 89);
stroke: rgb(89, 166, 89);
}
apiVersion: apps/v1
kind: Deployment
metadata:
name: selenium-grid-k8s-autoscaler-deployment
labels:
app: selenium-grid-k8s-autoscaler
name: selenium-grid-k8s-autoscaler
spec:
replicas: 1
selector: