(I’d love to see a topic added here for AI Tools and Workflows)
These prompts can be used with any models, editors and tools.
If you use Claude and like to stay in the same conversation for long and the bill is too high, there is a tool (which can be adapted for other editors) for optimizing the chat so that considerably less tokens are being consumed: GitHub - unclecode/cczip: Claude Context Compressor - Optimize Claude conversation history
I tried the Ultrathink and it was really nice and I will explain the “nice”.
In Chat mode, a model is focused on replying ultra fast - generate some code, answer a question or in-place edit some code etc. Answers are generally superficial.
In Agent mode, the model gets more context, uses tools to work with the context and spends more time on analyzing the context. Because more data is involved, answers are more “mature”.
In Ultrathink mode, reasoning is pushed even further with multiple roles: architect, researcher, coder, tester. In chat mode you only get a coder.
I tested this on a function generation for converting csv to json. The chat mode wrote the whole code and did not cover deeply nested structures. The Agent mode used an external library but did not cover deeply nested structures. The Ultrathink mode covered all cases including deep nesting, validations, edge cases.
Although this will be getting pretty long, I add, for comparison, two answers, one in Chat and one in Ultrathink (with the Sequential Thinking MCP which is set up in my editor - VS Code with Continue.dev for AI development).
Chat mode:
/**
* Convert CSV data to JSON format
* @param {string} csv - CSV string to convert
* @returns {Array<Object>} Array of JSON objects
*/
function csvToJson(csv) {
if (!csv || typeof csv !== 'string') {
throw new Error('Invalid CSV input: must be a non-empty string');
}
const lines = csv.trim().split('\n');
const headers = lines[0].split(',').map(header => header.trim());
const result = [];
for (let i = 1; i < lines.length; i++) {
const values = lines[i].split(',');
const obj = {};
headers.forEach((header, index) => {
let value = values[index] || '';
if (value.startsWith('"') && value.endsWith('"')) {
value = value.slice(1, -1).replace('""', '"');
}
if (!isNaN(value) && value !== '') {
obj[header] = Number(value);
} else {
obj[header] = value;
}
});
result.push(obj);
}
return result;
}
module.exports = csvToJson;
Ultrathink mode:
// app/imports/utils/csvToJSONWithTypes.js
import Papa from 'papaparse'
/**
* Converts a CSV string to an array of JSON objects with nested structures and preserved data types.
* Supports dot notation (user.profile.name) and bracket notation (user.roles[0].name) for nesting.
* Automatically infers types: number, boolean, null, date (ISO), and string.
*
* @param {string} csvString - The CSV content as a string.
* @returns {Array<Object>} Array of JSON objects with nested structure and correct types.
* @throws {Error} If CSV parsing fails.
*/
export const csvToJSONWithTypes = (csvString) => {
try {
const result = Papa.parse(csvString, {
header: true,
dynamicTyping: true,
skipEmptyLines: true,
transformHeader: (header) => header.trim(),
})
if (result.errors.length > 0) {
console.warn('CSV parsing warnings:', result.errors)
}
return result.data.map((row) => {
const obj = {}
Object.keys(row).forEach((key) => {
const value = row[key]
const path = key.split(/\.|\[|\]/).filter(Boolean) // Split into parts: ['user', 'profile', 'name'] or ['user', 'roles', '0', 'name']
let current = obj
for (let i = 0; i < path.length; i++) {
const part = path[i]
const nextPart = path[i + 1]
// Handle array index: e.g., roles[0]
if (nextPart && /^\d+$/.test(nextPart)) {
if (!current[part]) current[part] = []
current = current[part]
} else {
// Handle nested object: e.g., user.profile.name
if (i === path.length - 1) {
// Last part: assign value
current[part] = value
} else {
if (!current[part]) current[part] = {}
current = current[part]
}
}
}
})
// Final type inference for values
const inferType = (val) => {
if (val === null || val === undefined) return null
if (typeof val === 'string') {
if (val.toLowerCase() === 'true') return true
if (val.toLowerCase() === 'false') return false
if (val.toLowerCase() === 'null') return null
if (!isNaN(Date.parse(val))) return new Date(val)
}
return val
}
// Recursively apply type inference
const traverse = (node) => {
if (Array.isArray(node)) {
return node.map(traverse)
}
if (node && typeof node === 'object') {
Object.keys(node).forEach((k) => {
node[k] = traverse(node[k])
})
} else {
node = inferType(node)
}
return node
}
return traverse(obj)
})
} catch (err) {
throw new Error(`CSV parsing failed: ${err.message}`)
}
}